From: Boris BREZILLON Date: Thu, 10 Apr 2014 13:52:40 +0000 (+0200) Subject: pinctrl: sunxi: check clk_prepare_enable return value X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=6415093f7f643ba73518f83a3c07f32aeadb0317;p=openwrt%2Fstaging%2Fblogic.git pinctrl: sunxi: check clk_prepare_enable return value Check the clk_prepare_enable return value to avoid false positive probe. Signed-off-by: Boris BREZILLON Acked-by: Maxime Ripard Signed-off-by: Linus Walleij --- diff --git a/drivers/pinctrl/pinctrl-sunxi.c b/drivers/pinctrl/pinctrl-sunxi.c index f9fabe9bf47d..2d9ca1cf6daf 100644 --- a/drivers/pinctrl/pinctrl-sunxi.c +++ b/drivers/pinctrl/pinctrl-sunxi.c @@ -884,7 +884,9 @@ static int sunxi_pinctrl_probe(struct platform_device *pdev) goto gpiochip_error; } - clk_prepare_enable(clk); + ret = clk_prepare_enable(clk); + if (ret) + goto gpiochip_error; pctl->irq = irq_of_parse_and_map(node, 0); if (!pctl->irq) {