Skip to content

Commit 4a0a143

Browse files
HBh25Ytsbogend
authored andcommitted
mips: ralink: fix a refcount leak in ill_acc_of_setup()
of_node_put(np) needs to be called when pdev == NULL. Signed-off-by: Hangyu Hua <hbh25y@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
1 parent 200ed34 commit 4a0a143

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

arch/mips/ralink/ill_acc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ static int __init ill_acc_of_setup(void)
6161
pdev = of_find_device_by_node(np);
6262
if (!pdev) {
6363
pr_err("%pOFn: failed to lookup pdev\n", np);
64+
of_node_put(np);
6465
return -EINVAL;
6566
}
6667

0 commit comments

Comments
 (0)