mtd: nand: nandsim: remove unneeded checks for nand_scan_ident/tail()

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Dec 16 11:59:08 PST 2016


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=c75183020fca0229fce1fd6ba21ae840b41d79e9
Commit:     c75183020fca0229fce1fd6ba21ae840b41d79e9
Parent:     133fe8fa614175eb7e59599dbfe357c7bc7da851
Author:     Masahiro Yamada <yamada.masahiro at socionext.com>
AuthorDate: Fri Nov 4 19:43:09 2016 +0900
Committer:  Boris Brezillon <boris.brezillon at free-electrons.com>
CommitDate: Mon Nov 7 14:48:52 2016 +0100

    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 <yamada.masahiro at socionext.com>
    Reviewed-by: Marek Vasut <marek.vasut at gmail.com>
    Signed-off-by: Boris Brezillon <boris.brezillon at free-electrons.com>
---
 drivers/mtd/nand/nandsim.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
index 1eb9344..c76287a 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;
 	}
 



More information about the linux-mtd-cvs mailing list