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.stricted.de/?a=commitdiff_plain;h=0a413d708a5df80f50b2fb8c24a32c559a06bffc;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git mtd: simplify return logic in do_map_probe() Signed-off-by: Uwe Kleine-König Signed-off-by: Jiri Kosina --- diff --git a/drivers/mtd/chips/chipreg.c b/drivers/mtd/chips/chipreg.c index da1f96f385c7..0bbc61ba9524 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.