From 8fb87deb95ce3a0fa320ebc9df19f6f928714861 Mon Sep 17 00:00:00 2001 From: Pramod Gurav Date: Wed, 1 Oct 2014 15:33:00 +0530 Subject: gpio: amd8111: unmap ioport on failure case This change unmaps ioport when gpiochip_add fails Signed-off-by: Pramod Gurav Reviewed-by: Alexandre Courbot Signed-off-by: Linus Walleij --- 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 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; } -- cgit v1.2.3