[PATCH] mtd: nand: fix return value in nand_erase_nand()
Dan Carpenter
dan.carpenter at oracle.com
Wed Mar 21 01:10:14 PDT 2018
The problem is that "ret" isn't initialized on the success path.
Fixes: cc4ac09da649 ("mtd: Stop updating erase_info->state and calling mtd_erase_callback()")
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index 13dd67106859..87b72bf626ae 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -4653,6 +4653,7 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr,
}
}
+ ret = 0;
erase_exit:
/* Deselect and wake up anyone waiting on the device */
More information about the linux-mtd
mailing list