mtd: cfi_cmdset_0002: remove redundant assignment to variable ret
Subsystems (2)
PATCH 1/1 mtd: cfi_cmdset_0002: remove redundant assignment to variable ret
Variable ret is being assigned a value that is never read, the following goto statement jumps to a statement that assigns ret a return from the call to function do_write_oneword_once. The assignment is redundant and can be removed.
Signed-off-by Colin Ian King <[email protected]>
--- drivers/mtd/chips/cfi_cmdset_0002.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/mtd/chips/cfi_cmdset_0002.c +1 -3
@@ -1775,18 +1775,16 @@ static int __xipram do_write_oneword_retry(struct map_info *map, retry: ret =do_write_oneword_once (map, chip, adr, datum, mode, cfi);if (ret) {/* reset on all failures. */ map_write (map,CMD (0xF0 ), chip->start);/* FIXME - should have reset delay before continuing */ -if (++retry_cnt <=MAX_RETRIES ) { - ret =0 ; +if (++retry_cnt <=MAX_RETRIES ) goto retry; - } }xip_enable (map, chip, adr);return ret; } static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip,
Signature · 1 line
2.39.5
Quoted 6 lines · Colin Ian King
Variable ret is being assigned a value that is never read, the following goto statement jumps to a statement that assigns ret a return from the call to function
do_write_oneword_once. The assignment is redundant and can be removed.Signed-off-by Colin Ian King <[email protected]>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel