From: Pramod Gurav Date: Wed, 1 Oct 2014 10:03:00 +0000 (+0530) Subject: gpio: amd8111: unmap ioport on failure case X-Git-Tag: v4.14-rc1~6299^2~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8fb87deb95ce3a0fa320ebc9df19f6f928714861;p=platform%2Fkernel%2Flinux-rpi.git 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 --- 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; }