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>
This commit is contained in:
parent
4b7d835881
commit
8f910fd0d9
|
@ -321,6 +321,9 @@ static void __init pmac_pic_probe_oldstyle(void)
|
||||||
max_irqs = max_real_irqs = 64;
|
max_irqs = max_real_irqs = 64;
|
||||||
|
|
||||||
/* We might have a second cascaded heathrow */
|
/* We might have a second cascaded heathrow */
|
||||||
|
|
||||||
|
/* Compensate for of_node_put() in of_find_node_by_name() */
|
||||||
|
of_node_get(master);
|
||||||
slave = of_find_node_by_name(master, "mac-io");
|
slave = of_find_node_by_name(master, "mac-io");
|
||||||
|
|
||||||
/* Check ordering of master & slave */
|
/* Check ordering of master & slave */
|
||||||
|
|
Loading…
Reference in New Issue