aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/onenand
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-05-31 09:20:53 -0400
committerArtem Bityutskiy <artem.bityutskiy@intel.com>2011-08-15 06:26:38 -0400
commit1c3bd14bb0e10ce69761662d575d454f12070838 (patch)
tree250b94fdae4dd0f4dac5dca417b5b1f9e2aa68e8 /drivers/mtd/onenand
parent1712cde28532d9b0c98142e08a131b344d3200bd (diff)
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>
Diffstat (limited to 'drivers/mtd/onenand')
-rw-r--r--drivers/mtd/onenand/omap2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index a916dec29215..0d9073d4e417 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -741,6 +741,7 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev)
741 c->regulator = regulator_get(&pdev->dev, "vonenand"); 741 c->regulator = regulator_get(&pdev->dev, "vonenand");
742 if (IS_ERR(c->regulator)) { 742 if (IS_ERR(c->regulator)) {
743 dev_err(&pdev->dev, "Failed to get regulator\n"); 743 dev_err(&pdev->dev, "Failed to get regulator\n");
744 r = PTR_ERR(c->regulator);
744 goto err_release_dma; 745 goto err_release_dma;
745 } 746 }
746 c->onenand.enable = omap2_onenand_enable; 747 c->onenand.enable = omap2_onenand_enable;