trivial/mtd: simplify return logic in do_map_probe()

Submitted by Uwe Kleine-König on Feb. 13, 2012, 3:12 p.m.

Details

Message ID 1329145944-10068-1-git-send-email-u.kleine-koenig@pengutronix.de
State Accepted
Commit 0a413d708a5df80f50b2fb8c24a32c559a06bffc
Headers show

Commit Message

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(-)

Comments

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 hide | download patch | download mbox

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.