Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c10d8ee3 authored by Lothar Waßmann's avatar Lothar Waßmann Committed by Artem Bityutskiy
Browse files

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: default avatarLothar Waßmann <LW@KARO-electronics.de>
Acked-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
parent 5346c27c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1533,6 +1533,7 @@ static int mxcnd_probe(struct platform_device *pdev)
	return 0;

escan:
	if (host->clk_act)
		clk_disable_unprepare(host->clk);

	return err;