mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
gpio: iop: fix devm_ioremap_resource() return value checking
devm_ioremap_resource() returns a pointer to the remapped memory or an ERR_PTR() encoded error code on failure. Fix the check inside iop3xx_gpio_probe() accordingly. Cc: Lennert Buytenhek <[email protected]> Cc: Mikael Pettersson <[email protected]> Cc: Aaro Koskinen <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Acked-by: Alexandre Courbot <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
523dcce72c
commit
138d876e30
1 changed files with 2 additions and 0 deletions
|
|
@ -111,6 +111,8 @@ static int iop3xx_gpio_probe(struct platform_device *pdev)
|
|||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
base = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(base))
|
||||
return PTR_ERR(base);
|
||||
|
||||
return gpiochip_add(&iop3xx_chip);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue