[PATCH] powerpc/embedded6xx/hlwd-pic: Add missing of_node_put in hlwd_pic_probe

He Ying heying24 at huawei.com
Wed Nov 3 12:48:33 AEDT 2021


Early exits from for_each_compatible_node() should decrease the
node reference count.

Signed-off-by: He Ying <heying24 at huawei.com>
---
 arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c b/arch/powerpc/platforms/embedded6xx/hlwd-pic.c
index 15396333a90b..a4b020e4b6af 100644
--- a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c
+++ b/arch/powerpc/platforms/embedded6xx/hlwd-pic.c
@@ -214,6 +214,7 @@ void hlwd_pic_probe(void)
 			irq_set_chained_handler(cascade_virq,
 						hlwd_pic_irq_cascade);
 			hlwd_irq_host = host;
+			of_node_put(np);
 			break;
 		}
 	}
-- 
2.17.1



More information about the Linuxppc-dev mailing list