[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200923084458.GD1454948@mwanda>
Date: Wed, 23 Sep 2020 11:44:58 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Geert Uytterhoeven <geert+renesas@...der.be>
Cc: Magnus Damm <magnus.damm@...il.com>,
Simon Horman <horms+renesas@...ge.net.au>,
linux-renesas-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: [PATCH] soc: renesas: rmobile-sysc: Fix some leaks in
rmobile_init_pm_domains()
This code needs to call iounmap() on the error paths.
Fixes: 2ed29e15e4b2 ("ARM: shmobile: R-Mobile: Move pm-rmobile to drivers/soc/renesas/")
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
---
drivers/soc/renesas/rmobile-sysc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/soc/renesas/rmobile-sysc.c b/drivers/soc/renesas/rmobile-sysc.c
index 54b616ad4a62..d8e6dc650939 100644
--- a/drivers/soc/renesas/rmobile-sysc.c
+++ b/drivers/soc/renesas/rmobile-sysc.c
@@ -328,6 +328,7 @@ static int __init rmobile_init_pm_domains(void)
pmd = of_get_child_by_name(np, "pm-domains");
if (!pmd) {
pr_warn("%pOF lacks pm-domains node\n", np);
+ iounmap(base);
continue;
}
@@ -341,6 +342,7 @@ static int __init rmobile_init_pm_domains(void)
of_node_put(pmd);
if (ret) {
of_node_put(np);
+ iounmap(base);
break;
}
}
--
2.28.0
Powered by blists - more mailing lists