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>
This commit is contained in:
Qinglang Miao 2020-10-28 17:15:45 +08:00 committed by Thomas Bogendoerfer
parent 18ff14c87d
commit 5a5aa912f6

View File

@ -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",