[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1421243519-6257-2-git-send-email-geert+renesas@glider.be>
Date: Wed, 14 Jan 2015 14:51:57 +0100
From: Geert Uytterhoeven <geert+renesas@...der.be>
To: Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Bryan Wu <cooloney@...il.com>,
Richard Purdie <rpurdie@...ys.net>,
Jingoo Han <jg1.han@...sung.com>,
Lee Jones <lee.jones@...aro.org>
Cc: devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
Geert Uytterhoeven <geert+renesas@...der.be>,
linuxppc-dev@...ts.ozlabs.org
Subject: [PATCH 1/3] powerpc/pmac: Fix DT refcount imbalance in pmac_pic_probe_oldstyle
of_find_node_by_name() calls of_node_put() on its "from" parameter,
which must not be done on "master", as it's still in use, and will be
released manually later. This may cause a zero kref refcount.
Use of_get_child_by_name() instead to fix this.
Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
Cc: linuxppc-dev@...ts.ozlabs.org
---
Compile-tested only
---
arch/powerpc/platforms/powermac/pic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c
index 4c24bf60d39d2834..90ada1209c118902 100644
--- a/arch/powerpc/platforms/powermac/pic.c
+++ b/arch/powerpc/platforms/powermac/pic.c
@@ -321,7 +321,7 @@ static void __init pmac_pic_probe_oldstyle(void)
max_irqs = max_real_irqs = 64;
/* We might have a second cascaded heathrow */
- slave = of_find_node_by_name(master, "mac-io");
+ slave = of_get_child_by_name(master, "mac-io");
/* Check ordering of master & slave */
if (of_device_is_compatible(master, "gatwick")) {
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists