All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: tc6393xb: Handle return value of clk_prepare_enable
@ 2017-06-01  7:14 Arvind Yadav
  2017-06-05  8:13 ` Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-06-01  7:14 UTC (permalink / raw)
  To: lee.jones, linus.walleij; +Cc: 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/mfd/tc6393xb.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
index d16e71b..0c9f039 100644
--- a/drivers/mfd/tc6393xb.c
+++ b/drivers/mfd/tc6393xb.c
@@ -797,7 +797,9 @@ static int tc6393xb_resume(struct platform_device *dev)
 	int ret;
 	int i;
 
-	clk_prepare_enable(tc6393xb->clk);
+	ret = clk_prepare_enable(tc6393xb->clk);
+	if (ret)
+		return ret;
 
 	ret = tcpd->resume(dev);
 	if (ret)
-- 
1.9.1

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

* Re: [PATCH] mfd: tc6393xb: Handle return value of clk_prepare_enable
  2017-06-01  7:14 [PATCH] mfd: tc6393xb: Handle return value of clk_prepare_enable Arvind Yadav
@ 2017-06-05  8:13 ` Lee Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2017-06-05  8:13 UTC (permalink / raw)
  To: Arvind Yadav; +Cc: linus.walleij, linux-kernel

On Thu, 01 Jun 2017, Arvind Yadav wrote:

> clk_prepare_enable() can fail here and we must check its return value.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
>  drivers/mfd/tc6393xb.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Applied, thanks.

> diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
> index d16e71b..0c9f039 100644
> --- a/drivers/mfd/tc6393xb.c
> +++ b/drivers/mfd/tc6393xb.c
> @@ -797,7 +797,9 @@ static int tc6393xb_resume(struct platform_device *dev)
>  	int ret;
>  	int i;
>  
> -	clk_prepare_enable(tc6393xb->clk);
> +	ret = clk_prepare_enable(tc6393xb->clk);
> +	if (ret)
> +		return ret;
>  
>  	ret = tcpd->resume(dev);
>  	if (ret)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

end of thread, other threads:[~2017-06-05  8:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-01  7:14 [PATCH] mfd: tc6393xb: Handle return value of clk_prepare_enable Arvind Yadav
2017-06-05  8:13 ` Lee Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.