[PATCH] mtd: rawnand: vf610_nfc: fix returnvar.cocci warnings
Julia Lawall
julia.lawall at lip6.fr
Sun Mar 4 23:20:44 PST 2018
From: Fengguang Wu <fengguang.wu at intel.com>
Remove unneeded variable used to store return value.
Generated by: scripts/coccinelle/misc/returnvar.cocci
CC: Stefan Agner <stefan at agner.ch>
Signed-off-by: Fengguang Wu <fengguang.wu at intel.com>
Signed-off-by: Julia Lawall <julia.lawall at lip6.fr>
---
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,
More information about the linux-mtd
mailing list