devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] pinctrl: sunxi: fix error return code in sunxi_pinctrl_probe()
@ 2013-05-23  9:32 Wei Yongjun
  2013-05-24  9:23 ` Linus Walleij
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Yongjun @ 2013-05-23  9:32 UTC (permalink / raw)
  To: linus.walleij, grant.likely, rob.herring, emilio
  Cc: yongjun_wei, linux-kernel, devicetree-discuss

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

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>
---
 drivers/pinctrl/pinctrl-sunxi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-sunxi.c b/drivers/pinctrl/pinctrl-sunxi.c
index c058529..b7d8c89 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);
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-24  9:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-23  9:32 [PATCH -next] pinctrl: sunxi: fix error return code in sunxi_pinctrl_probe() Wei Yongjun
2013-05-24  9:23 ` Linus Walleij
2013-05-24  9:34   ` Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).