1
0
Fork 0

gpio: mb86s7x: Handle return value of clk_prepare_enable.

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>
zero-colors
Arvind Yadav 2017-08-01 12:13:05 +05:30 committed by Linus Walleij
parent 01062ad31b
commit d829b37ae3
1 changed files with 3 additions and 1 deletions

View File

@ -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);