mtd: fsl-quadspi: Propagate the error from of_modalias_node()
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Mon Dec 15 19:59:03 PST 2014
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=b26171e392c7d3952b6eeb6da62a861c5317e438
Commit: b26171e392c7d3952b6eeb6da62a861c5317e438
Parent: a0fa0b66ac1ce73ff791df977b07410a6f4cd337
Author: Fabio Estevam <fabio.estevam at freescale.com>
AuthorDate: Fri Oct 17 15:31:08 2014 -0300
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Wed Oct 22 01:35:41 2014 -0700
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 at freescale.com>
Acked-by: Huang Shijie <shijie8 at gmail.com>
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
drivers/mtd/spi-nor/fsl-quadspi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c
index d5269a2..94e7355 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",
More information about the linux-mtd-cvs
mailing list