Skip to content

Commit 23b44f9

Browse files
Peng Wuarndb
authored andcommitted
ARM: versatile: Add missing of_node_put in dcscb_init
The device_node pointer is returned by of_find_compatible_node with refcount incremented. We should use of_node_put() to avoid the refcount leak. Signed-off-by: Peng Wu <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected]' Signed-off-by: Arnd Bergmann <[email protected]>
1 parent 0af2de7 commit 23b44f9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/arm/mach-versatile/dcscb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ static int __init dcscb_init(void)
144144
if (!node)
145145
return -ENODEV;
146146
dcscb_base = of_iomap(node, 0);
147+
of_node_put(node);
147148
if (!dcscb_base)
148149
return -EADDRNOTAVAIL;
149150
cfg = readl_relaxed(dcscb_base + DCS_CFG_R);

0 commit comments

Comments
 (0)