]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
mtd: nand: nandsim: remove unneeded checks for nand_scan_ident/tail()
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 4 Nov 2016 10:43:09 +0000 (19:43 +0900)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Mon, 7 Nov 2016 13:48:52 +0000 (14:48 +0100)
The nand_scan_ident/tail() never returns a positive value when it
fails.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/nandsim.c

index 1eb934414eb5804978994a382dbb1d782ca59e53..c76287a6966315f50e93678743c87e342d150b37 100644 (file)
@@ -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;
        }