mtd: simplify return logic in do_map_probe()
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 13 Feb 2012 15:12:24 +0000 (16:12 +0100)
committerJiri Kosina <jkosina@suse.cz>
Tue, 28 Feb 2012 14:55:13 +0000 (15:55 +0100)
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/mtd/chips/chipreg.c

index da1f96f..0bbc61b 100644 (file)
@@ -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.