diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2015-03-03 05:02:15 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2015-03-25 01:53:27 -0400 |
commit | 8f910fd0d9d234764e89cb770940df2ece851e71 (patch) | |
tree | 12484df45b71c4cea3d623e5fdaa510a5faf4cce | |
parent | 4b7d8358819da84b1272cdae29ace4680254a104 (diff) |
powerpc/pmac: Fix DT refcount imbalance in pmac_pic_probe_oldstyle
Internally, 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.
Call of_node_get() before to compensate for this.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/platforms/powermac/pic.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c index 4c24bf60d39d..59cfc9d63c2d 100644 --- a/arch/powerpc/platforms/powermac/pic.c +++ b/arch/powerpc/platforms/powermac/pic.c | |||
@@ -321,6 +321,9 @@ static void __init pmac_pic_probe_oldstyle(void) | |||
321 | max_irqs = max_real_irqs = 64; | 321 | max_irqs = max_real_irqs = 64; |
322 | 322 | ||
323 | /* We might have a second cascaded heathrow */ | 323 | /* We might have a second cascaded heathrow */ |
324 | |||
325 | /* Compensate for of_node_put() in of_find_node_by_name() */ | ||
326 | of_node_get(master); | ||
324 | slave = of_find_node_by_name(master, "mac-io"); | 327 | slave = of_find_node_by_name(master, "mac-io"); |
325 | 328 | ||
326 | /* Check ordering of master & slave */ | 329 | /* Check ordering of master & slave */ |