From: Pramod Gurav Date: Wed, 1 Oct 2014 18:38:04 +0000 (+0530) Subject: gpio: grgpio: remove irq_domain resources on failure X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=65fdc966c012b62ce4da5bf8175140a9b2ec2ee7;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 --- 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; }