aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLothar Waßmann <LW@KARO-electronics.de>2012-12-06 02:42:27 -0500
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-12-10 09:45:04 -0500
commitc10d8ee3feaf725007e515b5f2972dffaa793f9a (patch)
tree0bd5b6fc8f633b00b3ef6e88d69fc91254759328 /drivers
parent5346c27c5fed6b30aff35e1fcb595625097e646c (diff)
mtd: mxc_nand: fix unbalanced clk_disable() in error path
If nand_scan_ident() or nand_scan_tail() fails, the NAND chip may have been deselected and the clock already disabled. Thus, check 'clk_act' in the error path to decide whether the clock still needs to be disabled. This fixes a: |WARNING: at drivers/clk/clk.c:472 __clk_disable+0x3c/0x78() Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/mxc_nand.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 4aef6a355d54..ab0fe383c50b 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -1533,7 +1533,8 @@ static int mxcnd_probe(struct platform_device *pdev)
1533 return 0; 1533 return 0;
1534 1534
1535escan: 1535escan:
1536 clk_disable_unprepare(host->clk); 1536 if (host->clk_act)
1537 clk_disable_unprepare(host->clk);
1537 1538
1538 return err; 1539 return err;
1539} 1540}