Commit 1c3bd14b authored by Axel Lin's avatar Axel Lin Committed by Artem Bityutskiy

mtd: onenand: return proper error if regulator_get fails

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
parent 1712cde2
...@@ -741,6 +741,7 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev) ...@@ -741,6 +741,7 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev)
c->regulator = regulator_get(&pdev->dev, "vonenand"); c->regulator = regulator_get(&pdev->dev, "vonenand");
if (IS_ERR(c->regulator)) { if (IS_ERR(c->regulator)) {
dev_err(&pdev->dev, "Failed to get regulator\n"); dev_err(&pdev->dev, "Failed to get regulator\n");
r = PTR_ERR(c->regulator);
goto err_release_dma; goto err_release_dma;
} }
c->onenand.enable = omap2_onenand_enable; c->onenand.enable = omap2_onenand_enable;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment