aboutsummaryrefslogtreecommitdiff
path: root/arch/mips
diff options
context:
space:
mode:
authorQinglang Miao2020-10-28 17:15:45 +0800
committerThomas Bogendoerfer2020-11-06 11:32:06 +0100
commit5a5aa912f687204d50455d0db36f94dd8de601c2 (patch)
tree798f3ce7b8f84debd9705d4a328810dd86f763be /arch/mips
parent18ff14c87d904f7968a143a6202740c27b4d8e7f (diff)
mips: ar7: add missing iounmap() on error in ar7_gpio_init
Add the missing iounmap() of gpch->regs before return from ar7_gpio_init() 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')
-rw-r--r--arch/mips/ar7/gpio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/mips/ar7/gpio.c b/arch/mips/ar7/gpio.c
index 8b006addd6ba..ae0e01b9438f 100644
--- a/arch/mips/ar7/gpio.c
+++ b/arch/mips/ar7/gpio.c
@@ -319,6 +319,7 @@ int __init ar7_gpio_init(void)
if (ret) {
printk(KERN_ERR "%s: failed to add gpiochip\n",
gpch->chip.label);
+ iounmap(gpch->regs);
return ret;
}
printk(KERN_INFO "%s: registered %d GPIOs\n",