[PATCH] mtd: rawnand: vf610_nfc: fix returnvar.cocci warnings

From: Julia Lawall
Date: Mon Mar 05 2018 - 02:20:51 EST


From: Fengguang Wu <fengguang.wu@xxxxxxxxx>

Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

CC: Stefan Agner <stefan@xxxxxxxx>
Signed-off-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
Signed-off-by: Julia Lawall <julia.lawall@xxxxxxx>
---

Not a big deal, but the code can be a tiny bit simpler.

vf610_nfc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/mtd/nand/raw/vf610_nfc.c
+++ b/drivers/mtd/nand/raw/vf610_nfc.c
@@ -870,7 +870,6 @@ static int vf610_nfc_write_page(struct m
struct vf610_nfc *nfc = mtd_to_nfc(mtd);
int trfr_sz = mtd->writesize + mtd->oobsize;
u32 row = 0, cmd1 = 0, cmd2 = 0, code = 0;
- int ret = 0;

cmd2 |= NAND_CMD_SEQIN << CMD_BYTE1_SHIFT;
code |= COMMAND_CMD_BYTE1 | COMMAND_CAR_BYTE1 | COMMAND_CAR_BYTE2;
@@ -894,7 +893,7 @@ static int vf610_nfc_write_page(struct m
vf610_nfc_run(nfc, 0, row, cmd1, cmd2, trfr_sz);
vf610_nfc_ecc_mode(nfc, ECC_BYPASS);

- return ret;
+ return 0;
}

static int vf610_nfc_read_page_raw(struct mtd_info *mtd,