summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris BREZILLON <boris.brezillon@free-electrons.com>2014-04-10 15:52:40 +0200
committerLinus Walleij <linus.walleij@linaro.org>2014-04-22 13:38:35 +0200
commit6415093f7f643ba73518f83a3c07f32aeadb0317 (patch)
tree18624118ceae3a0d682f276ef5c6ed2f3367da48
parent3b02dad20fd5f6159dd5b0b0408f8065d3f48714 (diff)
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 <boris.brezillon@free-electrons.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/pinctrl/pinctrl-sunxi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-sunxi.c b/drivers/pinctrl/pinctrl-sunxi.c
index f9fabe9bf47..2d9ca1cf6da 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) {