diff options
author | Pramod Gurav <pramod.gurav@smartplayin.com> | 2014-10-01 15:33:00 +0530 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-10-27 16:26:35 +0100 |
commit | 8fb87deb95ce3a0fa320ebc9df19f6f928714861 (patch) | |
tree | b3136bb8a8d4a74de67306215f6d72327ae06054 /drivers/gpio | |
parent | 580b9676e53af8f037002c16bafc7037319bbbce (diff) | |
download | linux-8fb87deb95ce3a0fa320ebc9df19f6f928714861.tar.gz linux-8fb87deb95ce3a0fa320ebc9df19f6f928714861.tar.xz |
gpio: amd8111: unmap ioport on failure case
This change unmaps ioport when gpiochip_add fails
Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-amd8111.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-amd8111.c b/drivers/gpio/gpio-amd8111.c index 3c09f1a6872a..d3d2d1099f64 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; } |