[PATCH 1/2] mtd: fsl-quadspi: Propagate the error from of_modalias_node()
Huang Shijie
shijie8 at gmail.com
Sat Oct 18 19:30:10 PDT 2014
On Fri, Oct 17, 2014 at 03:31:08PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam at freescale.com>
>
> 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>
> ---
> 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 8d659a2..c5d10c3 100644
> --- a/drivers/mtd/spi-nor/fsl-quadspi.c
> +++ b/drivers/mtd/spi-nor/fsl-quadspi.c
> @@ -906,7 +906,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;
>
> id = spi_nor_match_id(modalias);
> --
> 1.9.1
>
thanks, please add my acks to both the patches.
Acked-by: Huang Shijie <shijie8 at gmail.com>
More information about the linux-mtd
mailing list