Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1700672 > unrolled thread

[PATCH 1/2] gpio: mb86s7x: Handle return value of clk_prepare_enable.

Started byArvind Yadav <arvind.yadav.cs@gmail.com>
First post2017-08-01 08:50 +0200
Last post2017-08-07 11:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/2] gpio: mb86s7x: Handle return value of clk_prepare_enable. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-01 08:50 +0200
    Re: [PATCH 1/2] gpio: mb86s7x: Handle return value of clk_prepare_enable. Linus Walleij <linus.walleij@linaro.org> - 2017-08-07 11:10 +0200

#1700672 — [PATCH 1/2] gpio: mb86s7x: Handle return value of clk_prepare_enable.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-01 08:50 +0200
Subject[PATCH 1/2] gpio: mb86s7x: Handle return value of clk_prepare_enable.
Message-ID<u9za9-8fB-5@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1705269

FromLinus Walleij <linus.walleij@linaro.org>
Date2017-08-07 11:10 +0200
Message-ID<ubMcV-6gU-1@gated-at.bofh.it>
In reply to#1700672
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web