mtd: simplify return logic in do_map_probe()

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon Mar 26 20:59:10 EDT 2012


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=3410a711a52bdb5eac1395fc6734a3ef801f903b
Commit:     3410a711a52bdb5eac1395fc6734a3ef801f903b
Parent:     88dfda5f7463ce73f14f4eaf275284047f367570
Author:     Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
AuthorDate: Mon Feb 13 16:12:24 2012 +0100
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Tue Mar 27 00:35:06 2012 +0100

    mtd: simplify return logic in do_map_probe()
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
    Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/chips/chipreg.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/chips/chipreg.c b/drivers/mtd/chips/chipreg.c
index da1f96f..0bbc61b 100644
--- a/drivers/mtd/chips/chipreg.c
+++ b/drivers/mtd/chips/chipreg.c
@@ -76,10 +76,7 @@ struct mtd_info *do_map_probe(const char *name, struct map_info *map)
 	*/
 	module_put(drv->module);
 
-	if (ret)
-		return ret;
-
-	return NULL;
+	return ret;
 }
 /*
  * Destroy an MTD device which was created for a map device.



More information about the linux-mtd-cvs mailing list