summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi-nor
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2014-10-17 15:31:08 -0300
committerBrian Norris <computersforpeace@gmail.com>2014-10-22 01:35:41 -0700
commitb26171e392c7d3952b6eeb6da62a861c5317e438 (patch)
tree07cf9be010395d961af63226b455a843b50534fc /drivers/mtd/spi-nor
parenta0fa0b66ac1ce73ff791df977b07410a6f4cd337 (diff)
mtd: fsl-quadspi: Propagate the error from of_modalias_node()
The 'map_failed' label will return 'ret', so we need to assign the error code to 'ret', otherwise the probe function will return success. 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')
-rw-r--r--drivers/mtd/spi-nor/fsl-quadspi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c
index d5269a26c839..94e73553abb3 100644
--- a/drivers/mtd/spi-nor/fsl-quadspi.c
+++ b/drivers/mtd/spi-nor/fsl-quadspi.c
@@ -905,7 +905,8 @@ static int fsl_qspi_probe(struct platform_device *pdev)
nor->prepare = fsl_qspi_prep;
nor->unprepare = fsl_qspi_unprep;
- if (of_modalias_node(np, modalias, sizeof(modalias)) < 0)
+ ret = of_modalias_node(np, modalias, sizeof(modalias));
+ if (ret < 0)
goto map_failed;
ret = of_property_read_u32(np, "spi-max-frequency",