Commit d72f88a4 authored by Wei Yongjun's avatar Wei Yongjun Committed by Linus Walleij

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 950707c0
(pinctrl: sunxi: add clock support)
Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 7ccbc60c
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment