Parcourir la source

mtd: onenand: return proper error if regulator_get fails

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Axel Lin il y a 14 ans
Parent
commit
1c3bd14bb0
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      drivers/mtd/onenand/omap2.c

+ 1 - 0
drivers/mtd/onenand/omap2.c

@@ -741,6 +741,7 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev)
 		c->regulator = regulator_get(&pdev->dev, "vonenand");
 		if (IS_ERR(c->regulator)) {
 			dev_err(&pdev->dev,  "Failed to get regulator\n");
+			r = PTR_ERR(c->regulator);
 			goto err_release_dma;
 		}
 		c->onenand.enable = omap2_onenand_enable;