aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2015-01-22 19:43:05 -0500
committerBrian Norris <computersforpeace@gmail.com>2015-02-05 22:51:27 -0500
commite4ca6840837be86b89e77c8402c1e6ab8a36f274 (patch)
treeb35866596efd5b6b38bd5697ec9977fda2e58908
parent0760e818646d801a13eed57f5fb75c43c7c2794a (diff)
mtd: fsl-quadspi: Fix the error paths
Jumping to 'map_failed' label is not correct at these points, as it misses to disable the clocks that were previously enabled. Jump to 'irq_failed' label instead that will correctly disable the clocks. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Han Xu <han.xu@freescale.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
-rw-r--r--drivers/mtd/spi-nor/fsl-quadspi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c
index a46bea33580f..a733bd2eb393 100644
--- a/drivers/mtd/spi-nor/fsl-quadspi.c
+++ b/drivers/mtd/spi-nor/fsl-quadspi.c
@@ -890,24 +890,24 @@ static int fsl_qspi_probe(struct platform_device *pdev)
890 890
891 ret = of_modalias_node(np, modalias, sizeof(modalias)); 891 ret = of_modalias_node(np, modalias, sizeof(modalias));
892 if (ret < 0) 892 if (ret < 0)
893 goto map_failed; 893 goto irq_failed;
894 894
895 ret = of_property_read_u32(np, "spi-max-frequency", 895 ret = of_property_read_u32(np, "spi-max-frequency",
896 &q->clk_rate); 896 &q->clk_rate);
897 if (ret < 0) 897 if (ret < 0)
898 goto map_failed; 898 goto irq_failed;
899 899
900 /* set the chip address for READID */ 900 /* set the chip address for READID */
901 fsl_qspi_set_base_addr(q, nor); 901 fsl_qspi_set_base_addr(q, nor);
902 902
903 ret = spi_nor_scan(nor, modalias, SPI_NOR_QUAD); 903 ret = spi_nor_scan(nor, modalias, SPI_NOR_QUAD);
904 if (ret) 904 if (ret)
905 goto map_failed; 905 goto irq_failed;
906 906
907 ppdata.of_node = np; 907 ppdata.of_node = np;
908 ret = mtd_device_parse_register(mtd, NULL, &ppdata, NULL, 0); 908 ret = mtd_device_parse_register(mtd, NULL, &ppdata, NULL, 0);
909 if (ret) 909 if (ret)
910 goto map_failed; 910 goto irq_failed;
911 911
912 /* Set the correct NOR size now. */ 912 /* Set the correct NOR size now. */
913 if (q->nor_size == 0) { 913 if (q->nor_size == 0) {