This change unmaps ioport when gpiochip_add fails Cc: Linus Walleij <linus.wall...@linaro.org> Cc: Alexandre Courbot <gnu...@gmail.com> Cc: linux-g...@vger.kernel.org Signed-off-by: Pramod Gurav <pramod.gu...@smartplayin.com> --- 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 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; } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/