summaryrefslogtreecommitdiff
path: root/drivers/gpio
diff options
context:
space:
mode:
authorPramod Gurav <pramod.gurav@smartplayin.com>2014-10-01 15:33:00 +0530
committerLinus Walleij <linus.walleij@linaro.org>2014-10-27 16:26:35 +0100
commit8fb87deb95ce3a0fa320ebc9df19f6f928714861 (patch)
treeb3136bb8a8d4a74de67306215f6d72327ae06054 /drivers/gpio
parent580b9676e53af8f037002c16bafc7037319bbbce (diff)
downloadlinux-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.c1
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;
}