From: Peng Wu Date: Thu, 28 Apr 2022 23:03:56 +0000 (+0200) Subject: ARM: versatile: Add missing of_node_put in dcscb_init X-Git-Tag: baikal/aarch64/sdk6.1~3916^2~1 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=e2b1353bbd8ecc2172fb6c6f7d677e3a16570444;p=kernel.git 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 Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20220428230356.69418-1-linus.walleij@linaro.org' Signed-off-by: Arnd Bergmann --- diff --git a/arch/arm/mach-versatile/dcscb.c b/arch/arm/mach-versatile/dcscb.c index 866270e7f2712..d8797350996d9 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);