* [PATCH] mips: ar7: add missing iounmap() on error in ar7_gpio_init
@ 2020-10-28 9:15 Qinglang Miao
2020-11-06 10:49 ` Thomas Bogendoerfer
0 siblings, 1 reply; 2+ messages in thread
From: Qinglang Miao @ 2020-10-28 9:15 UTC (permalink / raw)
To: Thomas Bogendoerfer; +Cc: linux-mips, linux-kernel, Qinglang Miao
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>
---
arch/mips/ar7/gpio.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/mips/ar7/gpio.c b/arch/mips/ar7/gpio.c
index 8b006addd..ae0e01b94 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",
--
2.23.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] mips: ar7: add missing iounmap() on error in ar7_gpio_init
2020-10-28 9:15 [PATCH] mips: ar7: add missing iounmap() on error in ar7_gpio_init Qinglang Miao
@ 2020-11-06 10:49 ` Thomas Bogendoerfer
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2020-11-06 10:49 UTC (permalink / raw)
To: Qinglang Miao; +Cc: linux-mips, linux-kernel
On Wed, Oct 28, 2020 at 05:15:45PM +0800, Qinglang Miao wrote:
> 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>
> ---
> arch/mips/ar7/gpio.c | 1 +
> 1 file changed, 1 insertion(+)
applied to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-06 10:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-28 9:15 [PATCH] mips: ar7: add missing iounmap() on error in ar7_gpio_init Qinglang Miao
2020-11-06 10:49 ` Thomas Bogendoerfer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®