lkml.org 
[lkml]   [2022]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] leds: netxbig: Fix refcount leak in netxbig_leds_get_of_pdata
Hi!

> of_parse_phandle() returns a node pointer with refcount
> incremented, we should use of_node_put() on it when not needed anymore.
> When of_find_device_by_node() fails, of_node_put() is missing.

Can you take a look at the code and simplify it? AFAICT the node_put
should go right after

gpio_ext_pdev = of_find_device_by_node(gpio_ext_np);


. Best regards,
Pavel
--
People of Russia, stop Putin before his war on Ukraine escalates.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2022-05-12 08:54    [W:1.594 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site