summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2013-12-02 03:50:02 +0100
committerBrian Norris <computersforpeace@gmail.com>2014-01-03 20:22:21 +0100
commitdcedf628f55ccdb34c8783a03bed9382bb5e1a82 (patch)
tree56f6253ad2a8f649fcf5075378393f85326f4a1b /drivers/mtd
parentmtd: mxc_nand: remove duplicated ecc_stats counting (diff)
downloadlinux-dcedf628f55ccdb34c8783a03bed9382bb5e1a82.tar.xz
linux-dcedf628f55ccdb34c8783a03bed9382bb5e1a82.zip
mtd: nand: mxc_nand: Check the return value from clk_prepare_enable()
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> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/mxc_nand.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index a4bad1165c2a..7a4e032f6c7c 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -1511,7 +1511,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;
/*