Commit 558ab2e8 authored by Tiezhu Yang's avatar Tiezhu Yang Committed by Bartosz Golaszewski

gpio: pxa: Fix return value of pxa_gpio_probe()

When call function devm_platform_ioremap_resource(), we should use IS_ERR()
to check the return value and return PTR_ERR() if failed.

Fixes: 542c25b7 ("drivers: gpio: pxa: use devm_platform_ioremap_resource()")
Signed-off-by: default avatarTiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
parent e6862430
...@@ -660,8 +660,8 @@ static int pxa_gpio_probe(struct platform_device *pdev) ...@@ -660,8 +660,8 @@ static int pxa_gpio_probe(struct platform_device *pdev)
pchip->irq1 = irq1; pchip->irq1 = irq1;
gpio_reg_base = devm_platform_ioremap_resource(pdev, 0); gpio_reg_base = devm_platform_ioremap_resource(pdev, 0);
if (!gpio_reg_base) if (IS_ERR(gpio_reg_base))
return -EINVAL; return PTR_ERR(gpio_reg_base);
clk = clk_get(&pdev->dev, NULL); clk = clk_get(&pdev->dev, NULL);
if (IS_ERR(clk)) { if (IS_ERR(clk)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment