Re: [PATCH 03/12] PowerPC-83xx: add missing of_node_put after of_device_is_available

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

 



> @@ -221,8 +221,10 @@ int mpc837x_usb_cfg(void)
>  	int ret = 0;
>
>  	np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr");
> -	if (!np || !of_device_is_available(np))
> +	if (!np || !of_device_is_available(np)) {
> +		of_node_put(np);
>  		return -ENODEV;
> +	}
>  	prop = of_get_property(np, "phy_type", NULL);
>
>  	if (!prop || (strcmp(prop, "ulpi") && strcmp(prop, "serial"))) {

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