From: Claudiu Beznea <claudiu.beznea@microchip.com>
Date: Wed, 5 Aug 2020 11:36:50 +0300
Subject: ARM: at91: pm: of_node_put() after its usage
Git-commit: e222f943519564978e082c152b4140a47e93392c
Patch-mainline: v5.10-rc1
References: git-fixes
Put node after it has been used.
Fixes: 13f16017d3e3f ("ARM: at91: pm: Tie the USB clock mask to the pmc")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/1596616610-15460-4-git-send-email-claudiu.beznea@microchip.com
Acked-by: Ivan T. Ivanov <iivanov@suse.de>
---
arch/arm/mach-at91/pm.c | 1 +
1 file changed, 1 insertion(+)
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -794,6 +794,7 @@ static void __init at91_pm_init(void (*p
pmc_np = of_find_matching_node_and_match(NULL, atmel_pmc_ids, &of_id);
soc_pm.data.pmc = of_iomap(pmc_np, 0);
+ of_node_put(pmc_np);
if (!soc_pm.data.pmc) {
pr_err("AT91: PM not supported, PMC not found\n");
return;