From 4c9b44e774025d9fd6f8384a7dcd6a6917043650 Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Wed, 2 Oct 2024 18:22:58 +0100 Subject: 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 Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20241002172258.958113-1-colin.i.king@gmail.com --- drivers/mtd/chips/cfi_cmdset_0002.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/mtd') diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index 9f2223d3e8e1..7c91429a670b 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c @@ -1779,10 +1779,8 @@ static int __xipram do_write_oneword_retry(struct map_info *map, 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); -- cgit v1.2.3