summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Wu <wupeng58@huawei.com>2022-04-29 02:03:56 +0300
committerArnd Bergmann <arnd@arndb.de>2022-05-03 17:58:06 +0300
commit23b44f9c649bbef10b45fa33080cd8b4166800ae (patch)
treef54b9d275decd0f80668ce505bff967f8beaff69
parent0af2de76a21f24ab09f865da748ef3a63b4c2bd6 (diff)
downloadlinux-23b44f9c649bbef10b45fa33080cd8b4166800ae.tar.xz
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 <wupeng58@huawei.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20220428230356.69418-1-linus.walleij@linaro.org' Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--arch/arm/mach-versatile/dcscb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/mach-versatile/dcscb.c b/arch/arm/mach-versatile/dcscb.c
index 866270e7f271..d8797350996d 100644
--- a/arch/arm/mach-versatile/dcscb.c
+++ b/arch/arm/mach-versatile/dcscb.c
@@ -144,6 +144,7 @@ static int __init dcscb_init(void)
if (!node)
return -ENODEV;
dcscb_base = of_iomap(node, 0);
+ of_node_put(node);
if (!dcscb_base)
return -EADDRNOTAVAIL;
cfg = readl_relaxed(dcscb_base + DCS_CFG_R);