Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 41d107ad authored by Dan Carpenter's avatar Dan Carpenter Committed by Linus Walleij
Browse files

gpio: pxa: checking IS_ERR() instead of NULL



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

Fixes: 384ca3c6 ('gpio: pxa: change the interrupt management')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 4b63739e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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");