[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201028091546.136258-1-miaoqinglang@huawei.com>
Date: Wed, 28 Oct 2020 17:15:46 +0800
From: Qinglang Miao <miaoqinglang@...wei.com>
To: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
CC: <linux-mips@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
"Qinglang Miao" <miaoqinglang@...wei.com>
Subject: [PATCH] mips: cm: add missing iounmap() on error in mips_cm_probe()
Add the missing iounmap() of iounmap(mips_gcr_base) before
return from mips_cm_probe() in the error handling case.
Signed-off-by: Qinglang Miao <miaoqinglang@...wei.com>
---
arch/mips/kernel/mips-cm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/mips/kernel/mips-cm.c b/arch/mips/kernel/mips-cm.c
index f60af512c..90f1c3df1 100644
--- a/arch/mips/kernel/mips-cm.c
+++ b/arch/mips/kernel/mips-cm.c
@@ -266,6 +266,7 @@ int mips_cm_probe(void)
if ((base_reg & CM_GCR_BASE_GCRBASE) != addr) {
pr_err("GCRs appear to have been moved (expected them at 0x%08lx)!\n",
(unsigned long)addr);
+ iounmap(mips_gcr_base);
mips_gcr_base = NULL;
return -ENODEV;
}
--
2.23.0
Powered by blists - more mailing lists