gpio: grgpio: remove irq_domain resources on failure
authorPramod Gurav <pramod.gurav@smartplayin.com>
Wed, 1 Oct 2014 18:38:04 +0000 (00:08 +0530)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 28 Oct 2014 15:11:19 +0000 (16:11 +0100)
Call irq_domain_remove when gpiochip_add fails to release irq_domain
resources.

Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
Acked-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-grgpio.c

index 66ad3df9d9cfdbbb3acab6af63df4a6101d8671a..38acdcea979937dd40e4a18ae5af2f56572c700a 100644 (file)
@@ -441,6 +441,7 @@ static int grgpio_probe(struct platform_device *ofdev)
        err = gpiochip_add(gc);
        if (err) {
                dev_err(&ofdev->dev, "Could not add gpiochip\n");
+               irq_domain_remove(priv->domain);
                return err;
        }