From 65fdc966c012b62ce4da5bf8175140a9b2ec2ee7 Mon Sep 17 00:00:00 2001 From: Pramod Gurav Date: Thu, 2 Oct 2014 00:08:04 +0530 Subject: [PATCH] gpio: grgpio: remove irq_domain resources on failure Call irq_domain_remove when gpiochip_add fails to release irq_domain resources. Signed-off-by: Pramod Gurav Acked-by: Alexandre Courbot Signed-off-by: Linus Walleij --- drivers/gpio/gpio-grgpio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/gpio-grgpio.c b/drivers/gpio/gpio-grgpio.c index 66ad3df9d9cf..38acdcea9799 100644 --- a/drivers/gpio/gpio-grgpio.c +++ b/drivers/gpio/gpio-grgpio.c @@ -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; } -- GitLab