mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01:00
of/irq: Fix remaining refcount leaks in of_irq_init()
Successfully initialized controllers are moved to intc_parent_list,
but the final cleanup only frees the descriptors. The device node
references taken with of_node_get() and the interrupt parent
references are therefore leaked on the normal return path. Drop both
before kfree(), as the intc_desc_list cleanup already does.
Fixes: 8363ccb917 ("of/irq: add missing of_node_put")
Cc: [email protected]
Signed-off-by: Wentao Liang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Rob Herring (Arm) <[email protected]>
This commit is contained in:
1 parent
77f21a59e8
commit
30724547b2
1 file changed
+2
@@ -754,6 +754,8 @@ void __init of_irq_init(const struct of_device_id *matches)
|
||||
|
||||
list_for_each_entry_safe(desc, temp_desc, &intc_parent_list, list) {
|
||||
list_del(&desc->list);
|
||||
of_node_put(desc->interrupt_parent);
|
||||
of_node_put(desc->dev);
|
||||
kfree(desc);
|
||||
}
|
||||
err:
|
||||
|
||||
Reference in new issue
Block a user