diff options
author | Peng Wu <wupeng58@huawei.com> | 2022-04-29 02:03:56 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-06-14 19:11:30 +0300 |
commit | fcd1999ba97445a12cc394f5f42ffd9116bf0185 (patch) | |
tree | cb9cc8e8c366a947104277f80b503568fcea0c7f /arch | |
parent | fd48cf8f972f38b79b1b6c26ae9236b2e9cde160 (diff) | |
download | linux-fcd1999ba97445a12cc394f5f42ffd9116bf0185.tar.xz |
ARM: versatile: Add missing of_node_put in dcscb_init
[ Upstream commit 23b44f9c649bbef10b45fa33080cd8b4166800ae ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-vexpress/dcscb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/mach-vexpress/dcscb.c b/arch/arm/mach-vexpress/dcscb.c index 46a903c88c6a..f553cde614f9 100644 --- a/arch/arm/mach-vexpress/dcscb.c +++ b/arch/arm/mach-vexpress/dcscb.c @@ -143,6 +143,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); |