Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d829b37a authored by Arvind Yadav's avatar Arvind Yadav Committed by Linus Walleij
Browse files

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: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 01062ad3
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);