From: Dan Carpenter Date: Wed, 23 Sep 2020 11:31:42 +0000 (+0300) Subject: soc: renesas: rmobile-sysc: Fix some leaks in rmobile_init_pm_domains() X-Git-Tag: v4.14.213~175 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=579f8b9015bd14a67f5b32245e1a30a479833d44;p=users%2Fdwmw2%2Flinux.git soc: renesas: rmobile-sysc: Fix some leaks in rmobile_init_pm_domains() [ 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 Link: https://lore.kernel.org/r/20200923113142.GC1473821@mwanda Signed-off-by: Geert Uytterhoeven Signed-off-by: Sasha Levin --- diff --git a/arch/arm/mach-shmobile/pm-rmobile.c b/arch/arm/mach-shmobile/pm-rmobile.c index 3a4ed4c33a68e..e312f676a0fdf 100644 --- a/arch/arm/mach-shmobile/pm-rmobile.c +++ b/arch/arm/mach-shmobile/pm-rmobile.c @@ -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; }