Skip to content

Commit

Permalink
gpio: mb86s7x: Handle return value of clk_prepare_enable.
Browse files Browse the repository at this point in the history
clk_prepare_enable() can fail here and we must check its return value.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Arvind Yadav authored and Linus Walleij committed Aug 14, 2017
1 parent 01062ad commit d829b37
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpio/gpio-mb86s7x.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ static int mb86s70_gpio_probe(struct platform_device *pdev)
if (IS_ERR(gchip->clk))
return PTR_ERR(gchip->clk);

clk_prepare_enable(gchip->clk);
ret = clk_prepare_enable(gchip->clk);
if (ret)
return ret;

spin_lock_init(&gchip->lock);

Expand Down

0 comments on commit d829b37

Please sign in to comment.