Commit 8fb87deb authored by Pramod Gurav's avatar Pramod Gurav Committed by Linus Walleij

gpio: amd8111: unmap ioport on failure case

This change unmaps ioport when gpiochip_add fails
Signed-off-by: default avatarPramod Gurav <pramod.gurav@smartplayin.com>
Reviewed-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 580b9676
......@@ -223,6 +223,7 @@ static int __init amd_gpio_init(void)
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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment