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)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 26 Oct 2020 09:00:14 +0000 (10:00 +0100)
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>
drivers/soc/renesas/rmobile-sysc.c

index 54b616a..beb1c72 100644 (file)
@@ -327,6 +327,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;
                }