Patchwork trivial/mtd: simplify return logic in do_map_probe()

login
register
mail settings
Submitter Uwe Kleine-König
Date Feb. 13, 2012, 3:12 p.m.
Message ID <1329145944-10068-1-git-send-email-u.kleine-koenig@pengutronix.de>
Download mbox | patch
Permalink /patch/140915/
State New
Headers show

Comments

Uwe Kleine-König - Feb. 13, 2012, 3:12 p.m.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/mtd/chips/chipreg.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
Artem Bityutskiy - Feb. 29, 2012, 7:59 a.m.
On Mon, 2012-02-13 at 16:12 +0100, Uwe Kleine-König wrote:
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Pushed to l2-mtd.git tree, thanks!

Patch

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.