]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
soc: renesas: rmobile-sysc: Fix some leaks in rmobile_init_pm_domains()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 23 Sep 2020 11:31:42 +0000 (14:31 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Dec 2020 12:46:50 +0000 (13:46 +0100)
[ Upstream commit cf25d802e029c31efac8bdc979236927f37183bd ]

This code needs to call iounmap() on one error path.

Fixes: 2173fc7cb681 ("ARM: shmobile: R-Mobile: Add DT support for PM domains")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20200923113142.GC1473821@mwanda
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm/mach-shmobile/pm-rmobile.c

index 3a4ed4c33a68e51e0f213c9c6407a618eb4c4507..e312f676a0fdfa4fcb0113783f2d8d1e3bba3cd3 100644 (file)
@@ -336,6 +336,7 @@ static int __init rmobile_init_pm_domains(void)
 
                pmd = of_get_child_by_name(np, "pm-domains");
                if (!pmd) {
+                       iounmap(base);
                        pr_warn("%pOF lacks pm-domains node\n", np);
                        continue;
                }