aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-ml-ioh.c
diff options
context:
space:
mode:
authorAxel Lin <[email protected]>2013-05-19 06:00:47 +0000
committerLinus Walleij <[email protected]>2013-05-20 18:27:30 +0000
commitcfb10898efe1bc1f3eb8d8f37f164d9e2ac8b43a (patch)
tree4633a990efc5bcd9090bb594acc4a9923a0194cc /drivers/gpio/gpio-ml-ioh.c
parentgpio: mxs: Use set and clear capabilities of the gpio controller (diff)
downloadkernel-cfb10898efe1bc1f3eb8d8f37f164d9e2ac8b43a.tar.gz
kernel-cfb10898efe1bc1f3eb8d8f37f164d9e2ac8b43a.zip
gpio: Don't override the error code in probe error handling
Otherwise, we return 0 in probe error paths when gpiochip_remove() returns 0. Also show error message if gpiochip_remove() fails. Signed-off-by: Axel Lin <[email protected]> Cc: Tomoya MORINAGA <[email protected]> Cc: Denis Turischev <[email protected]> Cc: Lars Poeschel <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
Diffstat (limited to 'drivers/gpio/gpio-ml-ioh.c')
-rw-r--r--drivers/gpio/gpio-ml-ioh.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-ml-ioh.c b/drivers/gpio/gpio-ml-ioh.c
index b73366523fae..0966f2637ad2 100644
--- a/drivers/gpio/gpio-ml-ioh.c
+++ b/drivers/gpio/gpio-ml-ioh.c
@@ -496,8 +496,7 @@ err_irq_alloc_descs:
err_gpiochip_add:
while (--i >= 0) {
chip--;
- ret = gpiochip_remove(&chip->gpio);
- if (ret)
+ if (gpiochip_remove(&chip->gpio))
dev_err(&pdev->dev, "Failed gpiochip_remove(%d)\n", i);
}
kfree(chip_save);