diff options
author | Colin Ian King <colin.king@canonical.com> | 2021-06-18 10:33:31 +0100 |
---|---|---|
committer | Vignesh Raghavendra <vigneshr@ti.com> | 2021-06-21 11:17:10 +0530 |
commit | c17e5c85b32f8809135f3211ba2525fb98b5c09f (patch) | |
tree | c145b03357572feb20f272242cca806460c9e7c9 /drivers/mtd | |
parent | 36ac0228626585ba718186b9db2e5986a198152c (diff) |
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.c | 4 |
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; } |