lkml.org 
[lkml]   [2023]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] drivers: bus: intel: Fix resource leaks in for_each_available_child_of_node loop
Date
Ensure child node references are decremented properly
after loop complete.

Signed-off-by: Lu Hongfei <luhongfei@vivo.com>
---
drivers/bus/intel-ixp4xx-eb.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/bus/intel-ixp4xx-eb.c b/drivers/bus/intel-ixp4xx-eb.c
index f5ba6bee6fd8..cac8a8f5d7f9 100644
--- a/drivers/bus/intel-ixp4xx-eb.c
+++ b/drivers/bus/intel-ixp4xx-eb.c
@@ -398,6 +398,7 @@ static int ixp4xx_exp_probe(struct platform_device *pdev)
/* We have at least one child */
have_children = true;
}
+ of_node_put(child);

if (have_children)
return of_platform_default_populate(np, NULL, dev);
--
2.39.0
\
 
 \ /
  Last update: 2023-07-06 09:29    [W:0.030 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site