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 950707c0eb
(pinctrl: sunxi: add clock support)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Wei Yongjun 2013-05-23 17:32:14 +08:00 committed by Linus Walleij
parent 7ccbc60cd9
commit d72f88a42b
1 changed files with 3 additions and 1 deletions

View File

@ -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);