diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-05-19 13:58:37 +0800 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-05-27 15:37:08 +0200 |
commit | 97fc463769f1564e8eda2e2f70d3b6e92a25ff16 (patch) | |
tree | f1ee749b141b7055f9995afa506c83539bc6382e /drivers/pinctrl/vt8500 | |
parent | b134dc3feaa5136b376c7d2658bbe156bea19e63 (diff) | |
download | linux-stable-97fc463769f1564e8eda2e2f70d3b6e92a25ff16.tar.gz linux-stable-97fc463769f1564e8eda2e2f70d3b6e92a25ff16.tar.bz2 linux-stable-97fc463769f1564e8eda2e2f70d3b6e92a25ff16.zip |
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/vt8500')
-rw-r--r-- | drivers/pinctrl/vt8500/pinctrl-wmt.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pinctrl/vt8500/pinctrl-wmt.c b/drivers/pinctrl/vt8500/pinctrl-wmt.c index ab63104e8dc9..70d986e04afb 100644 --- a/drivers/pinctrl/vt8500/pinctrl-wmt.c +++ b/drivers/pinctrl/vt8500/pinctrl-wmt.c @@ -609,8 +609,7 @@ int wmt_pinctrl_probe(struct platform_device *pdev, return 0; fail_range: - err = gpiochip_remove(&data->gpio_chip); - if (err) + if (gpiochip_remove(&data->gpio_chip)) dev_err(&pdev->dev, "failed to remove gpio chip\n"); fail_gpio: pinctrl_unregister(data->pctl_dev); |