Messages in this thread Patch in this message | | | From | Lu Hongfei <> | Subject | [PATCH] drivers: bus: Fix resource leaks in for_each_available_child_of_node loop | Date | Thu, 6 Jul 2023 15:13:09 +0800 |
| |
Ensure child node references are decremented properly in the error path.
Signed-off-by: Lu Hongfei <luhongfei@vivo.com> --- drivers/bus/imx-weim.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c index 52a5d0447390..d05472f7c20f 100644 --- a/drivers/bus/imx-weim.c +++ b/drivers/bus/imx-weim.c @@ -251,6 +251,7 @@ static int weim_parse_dt(struct platform_device *pdev) else have_child = 1; } + of_node_put(child); if (have_child) ret = of_platform_default_populate(pdev->dev.of_node, -- 2.39.0
| |