gpio: amd8111: unmap ioport on failure case
authorPramod Gurav <pramod.gurav@smartplayin.com>
Wed, 1 Oct 2014 10:03:00 +0000 (15:33 +0530)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 27 Oct 2014 15:26:35 +0000 (16:26 +0100)
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>
drivers/gpio/gpio-amd8111.c

index 3c09f1a..d3d2d10 100644 (file)
@@ -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;
        }