mtd: rawnand: remove redundant assignment to variable ret
authorColin Ian King <colin.king@canonical.com>
Wed, 31 Jul 2019 08:52:08 +0000 (09:52 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 7 Aug 2019 16:15:38 +0000 (18:15 +0200)
Variable ret is being initialized with a value that is never read
and ret is being re-assigned a little later on. The assignment is
redundant and hence can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/nand_base.c

index 91f046d..5c2c30a 100644 (file)
@@ -4112,7 +4112,7 @@ static int nand_write_oob(struct mtd_info *mtd, loff_t to,
                          struct mtd_oob_ops *ops)
 {
        struct nand_chip *chip = mtd_to_nand(mtd);
-       int ret = -ENOTSUPP;
+       int ret;
 
        ops->retlen = 0;