2014-10-01 09:59:31

by Pramod Gurav

[permalink] [raw]
Subject: [PATCH] gpio: amd8111: unmap ioport on failure case

This change unmaps ioport when gpiochip_add fails

Cc: Linus Walleij <[email protected]>
Cc: Alexandre Courbot <[email protected]>
Cc: [email protected]
Signed-off-by: Pramod Gurav <[email protected]>
---
drivers/gpio/gpio-amd8111.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/gpio-amd8111.c b/drivers/gpio/gpio-amd8111.c
index 3c09f1a6..d3d2d10 100644
--- a/drivers/gpio/gpio-amd8111.c
+++ b/drivers/gpio/gpio-amd8111.c
@@ -223,6 +223,7 @@ found:
if (err) {
printk(KERN_ERR "GPIO registering failed (%d)\n",
err);
+ ioport_unmap(gp.pm);
release_region(gp.pmbase + PMBASE_OFFSET, PMBASE_SIZE);
goto out;
}
--
1.7.9.5


2014-10-09 06:49:20

by Alexandre Courbot

[permalink] [raw]
Subject: Re: [PATCH] gpio: amd8111: unmap ioport on failure case

On Wed, Oct 1, 2014 at 7:03 PM, Pramod Gurav
<[email protected]> wrote:
> This change unmaps ioport when gpiochip_add fails
>
> Cc: Linus Walleij <[email protected]>
> Cc: Alexandre Courbot <[email protected]>
> Cc: [email protected]
> Signed-off-by: Pramod Gurav <[email protected]>

Yep, looks like you need this indeed.

Reviewed-by: Alexandre Courbot <[email protected]>

2014-10-27 15:27:29

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH] gpio: amd8111: unmap ioport on failure case

On Wed, Oct 1, 2014 at 12:03 PM, Pramod Gurav
<[email protected]> wrote:

> This change unmaps ioport when gpiochip_add fails
>
> Cc: Linus Walleij <[email protected]>
> Cc: Alexandre Courbot <[email protected]>
> Cc: [email protected]
> Signed-off-by: Pramod Gurav <[email protected]>

Patch applied. Sorry for disproportionate delays...

Yours,
Linus Walleij