linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] gpio: mb86s7x: Handle return value of clk_prepare_enable.
@ 2017-08-01  6:43 Arvind Yadav
  2017-08-01  6:44 ` [PATCH 2/2] gpio: omap : Add missing clk_unprepare() Arvind Yadav
  2017-08-07  9:08 ` [PATCH 1/2] gpio: mb86s7x: Handle return value of clk_prepare_enable Linus Walleij
  0 siblings, 2 replies; 5+ messages in thread
From: Arvind Yadav @ 2017-08-01  6:43 UTC (permalink / raw)
  To: linus.walleij; +Cc: linux-gpio, linux-kernel

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(-)

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-08-07 11:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-01  6:43 [PATCH 1/2] gpio: mb86s7x: Handle return value of clk_prepare_enable Arvind Yadav
2017-08-01  6:44 ` [PATCH 2/2] gpio: omap : Add missing clk_unprepare() Arvind Yadav
2017-08-01 19:40   ` Grygorii Strashko
2017-08-07 11:58   ` Linus Walleij
2017-08-07  9:08 ` [PATCH 1/2] gpio: mb86s7x: Handle return value of clk_prepare_enable Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).