Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: rawnand: vf610_nfc: fix returnvar.cocci warnings
@ 2018-03-05  7:20 Julia Lawall
  0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2018-03-05  7:20 UTC (permalink / raw)
  To: Stefan Agner
  Cc: Boris Brezillon, Miquel Raynal, Richard Weinberger,
	David Woodhouse, Brian Norris, Marek Vasut, Cyrille Pitchen,
	linux-mtd, linux-kernel, kbuild-all

From: Fengguang Wu <fengguang.wu@intel.com>

 Remove unneeded variable used to store return value.

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

CC: Stefan Agner <stefan@agner.ch>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@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,

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-03-05  7:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-05  7:20 [PATCH] mtd: rawnand: vf610_nfc: fix returnvar.cocci warnings Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox