Message ID | e84a2b010f0632369030f92fa30572ba1e4aaaf2.1501569628.git.arvind.yadav.cs@gmail.com |
---|---|
State | New |
Headers | show |
On Tue, Aug 1, 2017 at 8:43 AM, Arvind Yadav <arvind.yadav.cs@gmail.com> wrote: > clk_prepare_enable() can fail here and we must check its return value. > > Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Patch applied. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/gpio/gpio-mb86s7x.c b/drivers/gpio/gpio-mb86s7x.c index ffb73f6..94d7726 100644 --- a/drivers/gpio/gpio-mb86s7x.c +++ b/drivers/gpio/gpio-mb86s7x.c @@ -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);
clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> --- drivers/gpio/gpio-mb86s7x.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)