lkml.org 
[lkml]   [2019]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 03/12] PowerPC-83xx: add missing of_node_put after of_device_is_available
From
Date
> @@ -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

\
 
 \ /
  Last update: 2019-04-14 17:27    [W:0.529 / U:0.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site