Message ID | 20220428230356.69418-1-linus.walleij@linaro.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 23b44f9c649bbef10b45fa33080cd8b4166800ae |
Headers | show |
Series | ARM: versatile: Add missing of_node_put in dcscb_init | expand |
Hello: This patch was applied to soc/soc.git (for-next) by Arnd Bergmann <arnd@arndb.de>: On Fri, 29 Apr 2022 01:03:56 +0200 you wrote: > From: Peng Wu <wupeng58@huawei.com> > > 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> > > [...] Here is the summary with links: - ARM: versatile: Add missing of_node_put in dcscb_init https://git.kernel.org/soc/soc/c/23b44f9c649b You are awesome, thank you!
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);