lkml.org 
[lkml]   [2019]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] ata: libahci_platform: Add of_node_put() before loop exit
From
Date
> +++ b/drivers/ata/libahci_platform.c
> @@ -497,6 +497,7 @@ struct ahci_host_priv *ahci_platform_get_resources(struct platform_device *pdev,
>
> if (of_property_read_u32(child, "reg", &port)) {
> rc = -EINVAL;
> + of_node_put(child);
> goto err_out;
> }

I suggest to move the added function call to another jump target.

- goto err_out;
+ goto err_put_node;

+err_put_node:
of_node_put(child);
err_out:



Regards,
Markus

\
 
 \ /
  Last update: 2019-09-19 20:18    [W:1.445 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site