mtd: onenand: return proper error if regulator_get fails

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon Nov 7 11:59:02 EST 2011


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=1c3bd14bb0e10ce69761662d575d454f12070838
Commit:     1c3bd14bb0e10ce69761662d575d454f12070838
Parent:     1712cde28532d9b0c98142e08a131b344d3200bd
Author:     Axel Lin <axel.lin at gmail.com>
AuthorDate: Tue May 31 21:20:53 2011 +0800
Committer:  Artem Bityutskiy <artem.bityutskiy at intel.com>
CommitDate: Mon Aug 15 13:26:38 2011 +0300

    mtd: onenand: return proper error if regulator_get fails
    
    Signed-off-by: Axel Lin <axel.lin at gmail.com>
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.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;



More information about the linux-mtd-cvs mailing list