Skip to content

Commit

Permalink
mtd: fsl-quadspi: Propagate the error from of_modalias_node()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabio Estevam authored and Brian Norris committed Oct 22, 2014
1 parent a0fa0b6 commit b26171e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/mtd/spi-nor/fsl-quadspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit b26171e

Please sign in to comment.