All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4/6] mtd: nand: vf610_nfc: Handle return value of clk_prepare_enable.
@ 2017-08-01 11:39 Arvind Yadav
  2017-08-03 15:20 ` Boris Brezillon
  0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-08-01 11:39 UTC (permalink / raw)
  To: boris.brezillon, richard, dwmw2, computersforpeace, marek.vasut,
	cyrille.pitchen, narmstrong
  Cc: linux-mtd, 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/mtd/nand/vf610_nfc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/vf610_nfc.c b/drivers/mtd/nand/vf610_nfc.c
index 744ab10..db03d4f 100644
--- a/drivers/mtd/nand/vf610_nfc.c
+++ b/drivers/mtd/nand/vf610_nfc.c
@@ -816,10 +816,13 @@ static int vf610_nfc_resume(struct device *dev)
 {
 	struct mtd_info *mtd = dev_get_drvdata(dev);
 	struct vf610_nfc *nfc = mtd_to_nfc(mtd);
+	int ret;
 
 	pinctrl_pm_select_default_state(dev);
 
-	clk_prepare_enable(nfc->clk);
+	ret = clk_prepare_enable(nfc->clk);
+	if (ret)
+		return ret;
 
 	vf610_nfc_preinit_controller(nfc);
 	vf610_nfc_init_controller(nfc);
-- 
1.9.1

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

* Re: [PATCH 4/6] mtd: nand: vf610_nfc: Handle return value of clk_prepare_enable.
  2017-08-01 11:39 [PATCH 4/6] mtd: nand: vf610_nfc: Handle return value of clk_prepare_enable Arvind Yadav
@ 2017-08-03 15:20 ` Boris Brezillon
  0 siblings, 0 replies; 2+ messages in thread
From: Boris Brezillon @ 2017-08-03 15:20 UTC (permalink / raw)
  To: Arvind Yadav
  Cc: richard, dwmw2, computersforpeace, marek.vasut, cyrille.pitchen,
	narmstrong, linux-mtd, linux-kernel

On Tue,  1 Aug 2017 17:09:18 +0530
Arvind Yadav <arvind.yadav.cs@gmail.com> wrote:

> clk_prepare_enable() can fail here and we must check its return value.

You're just a few days late, this one has already been proposed by
Fabio [1] ;-).

I'll queue other patches from this patchset.

Thanks,

Boris

[1]https://patchwork.ozlabs.org/patch/789812/

> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
>  drivers/mtd/nand/vf610_nfc.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/vf610_nfc.c b/drivers/mtd/nand/vf610_nfc.c
> index 744ab10..db03d4f 100644
> --- a/drivers/mtd/nand/vf610_nfc.c
> +++ b/drivers/mtd/nand/vf610_nfc.c
> @@ -816,10 +816,13 @@ static int vf610_nfc_resume(struct device *dev)
>  {
>  	struct mtd_info *mtd = dev_get_drvdata(dev);
>  	struct vf610_nfc *nfc = mtd_to_nfc(mtd);
> +	int ret;
>  
>  	pinctrl_pm_select_default_state(dev);
>  
> -	clk_prepare_enable(nfc->clk);
> +	ret = clk_prepare_enable(nfc->clk);
> +	if (ret)
> +		return ret;
>  
>  	vf610_nfc_preinit_controller(nfc);
>  	vf610_nfc_init_controller(nfc);

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

end of thread, other threads:[~2017-08-03 15:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-01 11:39 [PATCH 4/6] mtd: nand: vf610_nfc: Handle return value of clk_prepare_enable Arvind Yadav
2017-08-03 15:20 ` Boris Brezillon

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.