diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-05-19 01:58:37 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-05-27 09:37:08 -0400 |
commit | 97fc463769f1564e8eda2e2f70d3b6e92a25ff16 (patch) | |
tree | f1ee749b141b7055f9995afa506c83539bc6382e /drivers/pinctrl/pinctrl-coh901.c | |
parent | b134dc3feaa5136b376c7d2658bbe156bea19e63 (diff) |
pinctrl: 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 <axel.lin@ingics.com>
Acked-by: Tony Prisk <linux@prisktech.co.nz>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-coh901.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-coh901.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-coh901.c b/drivers/pinctrl/pinctrl-coh901.c index a67af419f531..d6b41747d687 100644 --- a/drivers/pinctrl/pinctrl-coh901.c +++ b/drivers/pinctrl/pinctrl-coh901.c | |||
@@ -830,7 +830,8 @@ static int __init u300_gpio_probe(struct platform_device *pdev) | |||
830 | return 0; | 830 | return 0; |
831 | 831 | ||
832 | err_no_range: | 832 | err_no_range: |
833 | err = gpiochip_remove(&gpio->chip); | 833 | if (gpiochip_remove(&gpio->chip)) |
834 | dev_err(&pdev->dev, "failed to remove gpio chip\n"); | ||
834 | err_no_chip: | 835 | err_no_chip: |
835 | err_no_domain: | 836 | err_no_domain: |
836 | err_no_port: | 837 | err_no_port: |