summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/spi-nor/fsl-quadspi.c
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2014-10-17 17:14:01 -0300
committerBrian Norris <computersforpeace@gmail.com>2014-10-22 01:35:41 -0700
commit77adc085aee0c96dc3536403b197707316c7c241 (patch)
treeb1006e00ff03424a1a1e6a19475a325efee76b6f /drivers/mtd/spi-nor/fsl-quadspi.c
parentb26171e392c7d3952b6eeb6da62a861c5317e438 (diff)
downloadlinux-stable-77adc085aee0c96dc3536403b197707316c7c241.tar.gz
linux-stable-77adc085aee0c96dc3536403b197707316c7c241.tar.bz2
linux-stable-77adc085aee0c96dc3536403b197707316c7c241.zip
mtd: fsl-quadspi: Let the clocks error path be clearer
When clk_prepare_enable(q->clk) fails it is clearer to disable the previous acquired clock (q->clk_en) in the error path rather than doing it locally. So disable q->clk_en in the error path only. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Huang Shijie <shijie8@gmail.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/spi-nor/fsl-quadspi.c')
-rw-r--r--drivers/mtd/spi-nor/fsl-quadspi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c
index 94e73553abb3..b6aab38c4a97 100644
--- a/drivers/mtd/spi-nor/fsl-quadspi.c
+++ b/drivers/mtd/spi-nor/fsl-quadspi.c
@@ -849,9 +849,8 @@ static int fsl_qspi_probe(struct platform_device *pdev)
ret = clk_prepare_enable(q->clk);
if (ret) {
- clk_disable_unprepare(q->clk_en);
dev_err(dev, "can not enable the qspi clock\n");
- goto map_failed;
+ goto clk_failed;
}
/* find the irq */
@@ -965,6 +964,7 @@ last_init_failed:
irq_failed:
clk_disable_unprepare(q->clk);
+clk_failed:
clk_disable_unprepare(q->clk_en);
map_failed:
dev_err(dev, "Freescale QuadSPI probe failed\n");