Re: [PATCH 09/12] meson-gx-socinfo: add missing of_node_put after of_device_is_available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> @@ -123,8 +123,10 @@  static int __init meson_gx_socinfo_init(
>  		return -ENODEV;
>
>  	/* check if interface is enabled */
> -	if (!of_device_is_available(np))
> +	if (!of_device_is_available(np)) {
> +		of_node_put(np);
>  		return -ENODEV;
> +	}
>
>  	/* check if chip-id is available */
>  	if (!of_property_read_bool(np, "amlogic,has-chip-id"))

How do you think about to adjust the exception handling in this function
implementation a bit more according to the Linux coding style?

Regards,
Markus




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux