linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpio: grgpio: remove irq_domain resources on failure
@ 2014-10-01 18:38 Pramod Gurav
  2014-10-17  9:02 ` Alexandre Courbot
  2014-10-28 15:13 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Pramod Gurav @ 2014-10-01 18:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: Pramod Gurav, Linus Walleij, Alexandre Courbot, linux-gpio

Call irq_domain_remove when gpiochip_add fails to release irq_domain
resources.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
---
 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 66ad3df..38acdce 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;
 	}
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] gpio: grgpio: remove irq_domain resources on failure
  2014-10-01 18:38 [PATCH] gpio: grgpio: remove irq_domain resources on failure Pramod Gurav
@ 2014-10-17  9:02 ` Alexandre Courbot
  2014-10-28 15:13 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Courbot @ 2014-10-17  9:02 UTC (permalink / raw)
  To: Pramod Gurav; +Cc: Linux Kernel Mailing List, Linus Walleij, linux-gpio

On Thu, Oct 2, 2014 at 3:38 AM, Pramod Gurav
<pramod.gurav@smartplayin.com> wrote:
> Call irq_domain_remove when gpiochip_add fails to release irq_domain
> resources.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Alexandre Courbot <gnurou@gmail.com>
> Cc: linux-gpio@vger.kernel.org
> Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
> ---
>  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 66ad3df..38acdce 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;
>         }

Acked-by: Alexandre Courbot <acourbot@nvidia.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gpio: grgpio: remove irq_domain resources on failure
  2014-10-01 18:38 [PATCH] gpio: grgpio: remove irq_domain resources on failure Pramod Gurav
  2014-10-17  9:02 ` Alexandre Courbot
@ 2014-10-28 15:13 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2014-10-28 15:13 UTC (permalink / raw)
  To: Pramod Gurav; +Cc: linux-kernel, Alexandre Courbot, linux-gpio

On Wed, Oct 1, 2014 at 8:38 PM, Pramod Gurav
<pramod.gurav@smartplayin.com> wrote:

> Call irq_domain_remove when gpiochip_add fails to release irq_domain
> resources.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Alexandre Courbot <gnurou@gmail.com>
> Cc: linux-gpio@vger.kernel.org
> Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>

Patch applied.

This driver is doing really weird stuff in it's IRQ remapping business...

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-28 15:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-01 18:38 [PATCH] gpio: grgpio: remove irq_domain resources on failure Pramod Gurav
2014-10-17  9:02 ` Alexandre Courbot
2014-10-28 15:13 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).