mtd: nand: gpmi: disable the clocks on errors
authorFabio Estevam <fabio.estevam@nxp.com>
Sat, 22 Oct 2016 16:15:22 +0000 (14:15 -0200)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Fri, 28 Oct 2016 07:58:05 +0000 (09:58 +0200)
commitce93bedb5ed2b16c08c6df4c797865f9ead600a3
tree045b76762fcddfe757a539ab39425e5756851e01
parent07d9a380680d1c0eb51ef87ff2eab5c994949e69
mtd: nand: gpmi: disable the clocks on errors

We should disable the previously enabled GPMI clocks in the error paths.

Also, when gpmi_enable_clk() fails simply return the error
code immediately rather than jumping to to the 'err_out' label.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Han Xu <han.xu@nxp.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/gpmi-nand/gpmi-lib.c