mtd: rawnand: legacy: Drop useless test in nand_legacy_set_defaults()
authorBoris Brezillon <[email protected]>
Sun, 11 Nov 2018 07:55:05 +0000 (08:55 +0100)
committerMiquel Raynal <[email protected]>
Fri, 7 Dec 2018 09:38:23 +0000 (10:38 +0100)
nand_legacy_set_defaults() returns directly if chip->exec_op != NULL,
no need to test !chip->exec_op after that.

Signed-off-by: Boris Brezillon <[email protected]>
Tested-by: Janusz Krzysztofik <[email protected]>
Signed-off-by: Miquel Raynal <[email protected]>
drivers/mtd/nand/raw/nand_legacy.c

index bf0304c4a6405484018743cdd8279083a977b180..f76b9356ba9c4d9bd74a4f3ae819e703cf8973e1 100644 (file)
@@ -585,7 +585,7 @@ void nand_legacy_set_defaults(struct nand_chip *chip)
                chip->legacy.chip_delay = 20;
 
        /* check, if a user supplied command function given */
-       if (!chip->legacy.cmdfunc && !chip->exec_op)
+       if (!chip->legacy.cmdfunc)
                chip->legacy.cmdfunc = nand_command;
 
        /* check, if a user supplied wait function given */