]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
mtd: fsl-quadspi: Propagate the error from of_modalias_node()
authorFabio Estevam <fabio.estevam@freescale.com>
Fri, 17 Oct 2014 18:31:08 +0000 (15:31 -0300)
committerBrian Norris <computersforpeace@gmail.com>
Wed, 22 Oct 2014 08:35:41 +0000 (01:35 -0700)
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>
drivers/mtd/spi-nor/fsl-quadspi.c

index d5269a26c839384eefa052534013828f6feaab89..94e73553abb38cffd84105a0e29bc890e80b2a6d 100644 (file)
@@ -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",