From 6415093f7f643ba73518f83a3c07f32aeadb0317 Mon Sep 17 00:00:00 2001 From: Boris BREZILLON Date: Thu, 10 Apr 2014 15:52:40 +0200 Subject: [PATCH] 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 --- 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 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) {