summaryrefslogtreecommitdiff
path: root/arch/mips/kernel/mips-cm.c
diff options
context:
space:
mode:
authorQinglang Miao <miaoqinglang@huawei.com>2020-10-28 17:15:46 +0800
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2020-11-06 11:33:11 +0100
commit2673ecf9586551c5bcee499c1cc1949f6f7cc9a1 (patch)
tree24f3b32a3e46855ec7bdc6829418f372142204fb /arch/mips/kernel/mips-cm.c
parent5a5aa912f687204d50455d0db36f94dd8de601c2 (diff)
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@huawei.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'arch/mips/kernel/mips-cm.c')
-rw-r--r--arch/mips/kernel/mips-cm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/mips/kernel/mips-cm.c b/arch/mips/kernel/mips-cm.c
index f60af512c877..90f1c3df1f0e 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;
}