Skip to content

Commit 558ab2e

Browse files
seehearfeelbrgl
authored andcommitted
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: 542c25b ("drivers: gpio: pxa: use devm_platform_ioremap_resource()") Signed-off-by: Tiezhu Yang <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent e686243 commit 558ab2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpio/gpio-pxa.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,8 +660,8 @@ static int pxa_gpio_probe(struct platform_device *pdev)
660660
pchip->irq1 = irq1;
661661

662662
gpio_reg_base = devm_platform_ioremap_resource(pdev, 0);
663-
if (!gpio_reg_base)
664-
return -EINVAL;
663+
if (IS_ERR(gpio_reg_base))
664+
return PTR_ERR(gpio_reg_base);
665665

666666
clk = clk_get(&pdev->dev, NULL);
667667
if (IS_ERR(clk)) {

0 commit comments

Comments
 (0)