linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: mxc_nand: Check the return value from clk_prepare_enable()
@ 2013-12-02  2:50 Fabio Estevam
  2013-12-04 21:59 ` Brian Norris
  0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2013-12-02  2:50 UTC (permalink / raw)
  To: computersforpeace; +Cc: Fabio Estevam, linux-mtd

From: Fabio Estevam <fabio.estevam@freescale.com>

clk_prepare_enable() may fail, so let's check its return value and propagate it
in the case of error.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/mtd/nand/mxc_nand.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 9dfdb06..0c09b8b 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -1512,7 +1512,9 @@ static int mxcnd_probe(struct platform_device *pdev)
 	if (err)
 		return err;
 
-	clk_prepare_enable(host->clk);
+	err = clk_prepare_enable(host->clk);
+	if (err)
+		return err;
 	host->clk_act = 1;
 
 	/*
-- 
1.8.1.2

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

* Re: [PATCH] mtd: nand: mxc_nand: Check the return value from clk_prepare_enable()
  2013-12-02  2:50 [PATCH] mtd: nand: mxc_nand: Check the return value from clk_prepare_enable() Fabio Estevam
@ 2013-12-04 21:59 ` Brian Norris
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Norris @ 2013-12-04 21:59 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Fabio Estevam, linux-mtd

On Mon, Dec 02, 2013 at 12:50:02AM -0200, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> clk_prepare_enable() may fail, so let's check its return value and propagate it
> in the case of error.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Pushed to l2-mtd.git. Thanks!

Brian

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

end of thread, other threads:[~2013-12-04 21:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-02  2:50 [PATCH] mtd: nand: mxc_nand: Check the return value from clk_prepare_enable() Fabio Estevam
2013-12-04 21:59 ` Brian Norris

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