Skip to content

Commit

Permalink
pinctrl: sunxi: fix error return code in sunxi_pinctrl_probe()
Browse files Browse the repository at this point in the history
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 950707c
(pinctrl: sunxi: add clock support)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Wei Yongjun authored and Linus Walleij committed May 27, 2013
1 parent 7ccbc60 commit d72f88a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/pinctrl/pinctrl-sunxi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit d72f88a

Please sign in to comment.