summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2021-06-18 12:33:31 +0300
committerVignesh Raghavendra <vigneshr@ti.com>2021-06-21 08:47:10 +0300
commitc17e5c85b32f8809135f3211ba2525fb98b5c09f (patch)
treec145b03357572feb20f272242cca806460c9e7c9 /drivers/mtd
parent36ac0228626585ba718186b9db2e5986a198152c (diff)
downloadlinux-c17e5c85b32f8809135f3211ba2525fb98b5c09f.tar.xz
mtd: spi-nor: remove redundant continue statement
The continue statement at the end of a for-loop has no effect, invert the if expression and remove the continue. Addresses-Coverity: ("Continue has no effect") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Reviewed-by: Michael Walle <michael@walle.cc> Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/spi-nor/core.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
index 970ed6e3f3ba..cc08bd707378 100644
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -1411,9 +1411,7 @@ spi_nor_find_best_erase_type(const struct spi_nor_erase_map *map,
continue;
spi_nor_div_by_erase_size(erase, addr, &rem);
- if (rem)
- continue;
- else
+ if (!rem)
return erase;
}