From: Fabio Estevam Date: Mon, 2 Dec 2013 02:50:02 +0000 (-0200) Subject: mtd: nand: mxc_nand: Check the return value from clk_prepare_enable() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=dcedf628f55ccdb34c8783a03bed9382bb5e1a82;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Brian Norris --- 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; /*