From: Masahiro Yamada Date: Fri, 4 Nov 2016 10:43:09 +0000 (+0900) Subject: mtd: nand: nandsim: remove unneeded checks for nand_scan_ident/tail() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c75183020fca0229fce1fd6ba21ae840b41d79e9;p=linux-beck.git mtd: nand: nandsim: remove unneeded checks for nand_scan_ident/tail() The nand_scan_ident/tail() never returns a positive value when it fails. Signed-off-by: Masahiro Yamada Reviewed-by: Marek Vasut Signed-off-by: Boris Brezillon --- diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c index 1eb934414eb5..c76287a69663 100644 --- a/drivers/mtd/nand/nandsim.c +++ b/drivers/mtd/nand/nandsim.c @@ -2313,8 +2313,6 @@ static int __init ns_init_module(void) retval = nand_scan_ident(nsmtd, 1, NULL); if (retval) { NS_ERR("cannot scan NAND Simulator device\n"); - if (retval > 0) - retval = -ENXIO; goto error; } @@ -2350,8 +2348,6 @@ static int __init ns_init_module(void) retval = nand_scan_tail(nsmtd); if (retval) { NS_ERR("can't register NAND Simulator\n"); - if (retval > 0) - retval = -ENXIO; goto error; }