Skip to content

Commit 4c9b44e

Browse files
ColinIanKingmiquelraynal
authored andcommitted
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]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
1 parent 7d18957 commit 4c9b44e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/mtd/chips/cfi_cmdset_0002.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1779,10 +1779,8 @@ static int __xipram do_write_oneword_retry(struct map_info *map,
17791779
map_write(map, CMD(0xF0), chip->start);
17801780
/* FIXME - should have reset delay before continuing */
17811781

1782-
if (++retry_cnt <= MAX_RETRIES) {
1783-
ret = 0;
1782+
if (++retry_cnt <= MAX_RETRIES)
17841783
goto retry;
1785-
}
17861784
}
17871785
xip_enable(map, chip, adr);
17881786

0 commit comments

Comments
 (0)