summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-05-23 17:32:14 +0800
committerLinus Walleij <linus.walleij@linaro.org>2013-05-27 15:37:09 +0200
commitd72f88a42bf9761e3a92e58879d25a65712ca87a (patch)
tree46d0cf31ad13ad2b54d3ec51c5a882a1f4dea84b
parent7ccbc60cd9c293304829662b043f4356f554fc3a (diff)
downloadtalos-obmc-linux-d72f88a42bf9761e3a92e58879d25a65712ca87a.tar.gz
talos-obmc-linux-d72f88a42bf9761e3a92e58879d25a65712ca87a.zip
pinctrl: sunxi: fix error return code in sunxi_pinctrl_probe()
Fix to return a negative error code from the devm_clk_get() error handling case instead of 0, as done elsewhere in this function. Introduced by commit 950707c0eb5c7aeaa2c446a04c824f4be686d2f6 (pinctrl: sunxi: add clock support) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/pinctrl/pinctrl-sunxi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-sunxi.c b/drivers/pinctrl/pinctrl-sunxi.c
index c058529db8f6..b7d8c890514c 100644
--- a/drivers/pinctrl/pinctrl-sunxi.c
+++ b/drivers/pinctrl/pinctrl-sunxi.c
@@ -1990,8 +1990,10 @@ static int sunxi_pinctrl_probe(struct platform_device *pdev)
}
clk = devm_clk_get(&pdev->dev, NULL);
- if (IS_ERR(clk))
+ if (IS_ERR(clk)) {
+ ret = PTR_ERR(clk);
goto gpiochip_error;
+ }
clk_prepare_enable(clk);
OpenPOWER on IntegriCloud