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 <windhl@126.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220716070758.539434-1-windhl@126.com
This commit is contained in:
Liang He 2022-07-16 15:07:58 +08:00 committed by Michael Ellerman
parent d36337ce95
commit b3d6637bcc
1 changed files with 1 additions and 0 deletions

View File

@ -627,6 +627,7 @@ static void __init kw_i2c_probe(void)
if (parent == NULL)
continue;
chans = parent->name[0] == 'u' ? 2 : 1;
of_node_put(parent);
for (i = 0; i < chans; i++)
kw_i2c_add(host, np, np, i);
} else {