From: Uwe Kleine-König Date: Mon, 13 Feb 2012 15:12:24 +0000 (+0100) Subject: mtd: simplify return logic in do_map_probe() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3410a711a52bdb5eac1395fc6734a3ef801f903b;p=mv-sheeva.git mtd: simplify return logic in do_map_probe() Signed-off-by: Uwe Kleine-König Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/chips/chipreg.c b/drivers/mtd/chips/chipreg.c index da1f96f385c..0bbc61ba952 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.