All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] gpio: pxa: checking IS_ERR() instead of NULL
@ 2016-01-05  9:56 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2016-01-05  9:56 UTC (permalink / raw)
  To: Robert Jarzmik
  Cc: Linus Walleij, Alexandre Courbot, linux-gpio, kernel-janitors

irq_domain_add_legacy() returns NULL on error, it doesn't return error
pointers.

Fixes: 384ca3c6a28d ('gpio: pxa: change the interrupt management')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
index c2d1a47..415852d 100644
--- a/drivers/gpio/gpio-pxa.c
+++ b/drivers/gpio/gpio-pxa.c
@@ -646,8 +646,8 @@ static int pxa_gpio_probe(struct platform_device *pdev)
 	pchip->irqdomain = irq_domain_add_legacy(pdev->dev.of_node,
 						 pxa_last_gpio + 1, irq_base,
 						 0, &pxa_irq_domain_ops, pchip);
-	if (IS_ERR(pchip->irqdomain))
-		return PTR_ERR(pchip->irqdomain);
+	if (!pchip->irqdomain)
+		return -ENOMEM;
 
 	irq0 = platform_get_irq_byname(pdev, "gpio0");
 	irq1 = platform_get_irq_byname(pdev, "gpio1");

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

* [patch] gpio: pxa: checking IS_ERR() instead of NULL
@ 2016-01-05  9:56 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2016-01-05  9:56 UTC (permalink / raw)
  To: Robert Jarzmik
  Cc: Linus Walleij, Alexandre Courbot, linux-gpio, kernel-janitors

irq_domain_add_legacy() returns NULL on error, it doesn't return error
pointers.

Fixes: 384ca3c6a28d ('gpio: pxa: change the interrupt management')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
index c2d1a47..415852d 100644
--- a/drivers/gpio/gpio-pxa.c
+++ b/drivers/gpio/gpio-pxa.c
@@ -646,8 +646,8 @@ static int pxa_gpio_probe(struct platform_device *pdev)
 	pchip->irqdomain = irq_domain_add_legacy(pdev->dev.of_node,
 						 pxa_last_gpio + 1, irq_base,
 						 0, &pxa_irq_domain_ops, pchip);
-	if (IS_ERR(pchip->irqdomain))
-		return PTR_ERR(pchip->irqdomain);
+	if (!pchip->irqdomain)
+		return -ENOMEM;
 
 	irq0 = platform_get_irq_byname(pdev, "gpio0");
 	irq1 = platform_get_irq_byname(pdev, "gpio1");

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

* Re: [patch] gpio: pxa: checking IS_ERR() instead of NULL
  2016-01-05  9:56 ` Dan Carpenter
@ 2016-01-05 10:19   ` Linus Walleij
  -1 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2016-01-05 10:19 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Robert Jarzmik, Alexandre Courbot, linux-gpio, kernel-janitors

On Tue, Jan 5, 2016 at 10:56 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:

> irq_domain_add_legacy() returns NULL on error, it doesn't return error
> pointers.
>
> Fixes: 384ca3c6a28d ('gpio: pxa: change the interrupt management')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Patch applied.

Yours,
Linus Walleij

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

* Re: [patch] gpio: pxa: checking IS_ERR() instead of NULL
@ 2016-01-05 10:19   ` Linus Walleij
  0 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2016-01-05 10:19 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Robert Jarzmik, Alexandre Courbot, linux-gpio, kernel-janitors

On Tue, Jan 5, 2016 at 10:56 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:

> irq_domain_add_legacy() returns NULL on error, it doesn't return error
> pointers.
>
> Fixes: 384ca3c6a28d ('gpio: pxa: change the interrupt management')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Patch applied.

Yours,
Linus Walleij

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

end of thread, other threads:[~2016-01-05 10:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-05  9:56 [patch] gpio: pxa: checking IS_ERR() instead of NULL Dan Carpenter
2016-01-05  9:56 ` Dan Carpenter
2016-01-05 10:19 ` Linus Walleij
2016-01-05 10:19   ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.