提交 77adc085 编写于 作者: F Fabio Estevam 提交者: Brian Norris

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: NFabio Estevam <fabio.estevam@freescale.com>
Acked-by: NHuang Shijie <shijie8@gmail.com>
Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
上级 b26171e3
...@@ -849,9 +849,8 @@ static int fsl_qspi_probe(struct platform_device *pdev) ...@@ -849,9 +849,8 @@ static int fsl_qspi_probe(struct platform_device *pdev)
ret = clk_prepare_enable(q->clk); ret = clk_prepare_enable(q->clk);
if (ret) { if (ret) {
clk_disable_unprepare(q->clk_en);
dev_err(dev, "can not enable the qspi clock\n"); dev_err(dev, "can not enable the qspi clock\n");
goto map_failed; goto clk_failed;
} }
/* find the irq */ /* find the irq */
...@@ -965,6 +964,7 @@ static int fsl_qspi_probe(struct platform_device *pdev) ...@@ -965,6 +964,7 @@ static int fsl_qspi_probe(struct platform_device *pdev)
irq_failed: irq_failed:
clk_disable_unprepare(q->clk); clk_disable_unprepare(q->clk);
clk_failed:
clk_disable_unprepare(q->clk_en); clk_disable_unprepare(q->clk_en);
map_failed: map_failed:
dev_err(dev, "Freescale QuadSPI probe failed\n"); dev_err(dev, "Freescale QuadSPI probe failed\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册