summaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-01-05 12:56:37 +0300
committerLinus Walleij <linus.walleij@linaro.org>2016-01-05 11:19:26 +0100
commit41d107ad92b4b8abf103b62269c34da80320f212 (patch)
treeabd7cd23f828a8904133adc750f59c481a480cd1 /drivers/gpio
parent4b63739efabc93d67d2b6812dd0cd41358fadf29 (diff)
downloadlinux-41d107ad92b4b8abf103b62269c34da80320f212.tar.bz2
gpio: pxa: checking IS_ERR() instead of NULL
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> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-pxa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
index c2d1a47ae784..415852d3ca8a 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");