Skip to content

Commit b3d6637

Browse files
windhlmpe
authored andcommitted
powerpc/powermac/low_i2c: Add missing of_node_put() in kw_i2c_probe()
Call of_node_put() for the reference 'parent' returned by of_get_parent() which has increased the refcount. Signed-off-by: Liang He <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent d36337c commit b3d6637

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/powerpc/platforms/powermac/low_i2c.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,7 @@ static void __init kw_i2c_probe(void)
627627
if (parent == NULL)
628628
continue;
629629
chans = parent->name[0] == 'u' ? 2 : 1;
630+
of_node_put(parent);
630631
for (i = 0; i < chans; i++)
631632
kw_i2c_add(host, np, np, i);
632633
} else {

0 commit comments

Comments
 (0)