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)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 26 Mar 2012 23:35:06 +0000 (00:35 +0100)
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/chips/chipreg.c

index da1f96f385c70b695f6e52696cc91b3bf6833948..0bbc61ba9524ec7f89e1ffba7b0aaceb53c365ad 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.