Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b26171e3 authored by Fabio Estevam's avatar Fabio Estevam Committed by Brian Norris
Browse files

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: default avatarFabio Estevam <fabio.estevam@freescale.com>
Acked-by: default avatarHuang Shijie <shijie8@gmail.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent a0fa0b66
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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",