From: Liang He Date: Sat, 16 Jul 2022 07:07:58 +0000 (+0800) Subject: powerpc/powermac/low_i2c: Add missing of_node_put() in kw_i2c_probe() X-Git-Tag: v6.1-rc1~103^2~155 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b3d6637bcc5d17caec56a76f6e430dcf444ef80e;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220716070758.539434-1-windhl@126.com --- diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c index c1c430c66dc9e..40f3aa432fbac 100644 --- a/arch/powerpc/platforms/powermac/low_i2c.c +++ b/arch/powerpc/platforms/powermac/low_i2c.c @@ -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 {