[PATCH] mtd: OneNAND: OMAP2: Return proper error if regulator_get fails
Axel Lin
axel.lin at gmail.com
Tue May 31 09:20:53 EDT 2011
Signed-off-by: Axel Lin <axel.lin at gmail.com>
---
drivers/mtd/onenand/omap2.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index a916dec..0d9073d 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)
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;
--
1.7.4.1
More information about the linux-mtd
mailing list