Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Arvind Yadav and committed by
Linus Walleij
d829b37a 01062ad3

+3 -1
+3 -1
drivers/gpio/gpio-mb86s7x.c
··· 168 168 if (IS_ERR(gchip->clk)) 169 169 return PTR_ERR(gchip->clk); 170 170 171 - clk_prepare_enable(gchip->clk); 171 + ret = clk_prepare_enable(gchip->clk); 172 + if (ret) 173 + return ret; 172 174 173 175 spin_lock_init(&gchip->lock); 174 176