mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 21:21:41 +00:00
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>
This commit is contained in:
parent
1712cde285
commit
1c3bd14bb0
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user