Skip to content

Commit

Permalink
mtd: onenand: return proper error if regulator_get fails
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
  • Loading branch information
Axel Lin authored and Artem Bityutskiy committed Aug 15, 2011
1 parent 1712cde commit 1c3bd14
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/mtd/onenand/omap2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1c3bd14

Please sign in to comment.