]> Git Repo - linux.git/commitdiff
mtd: spi-nor: remove redundant continue statement
authorColin Ian King <[email protected]>
Fri, 18 Jun 2021 09:33:31 +0000 (10:33 +0100)
committerVignesh Raghavendra <[email protected]>
Mon, 21 Jun 2021 05:47:10 +0000 (11:17 +0530)
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 <[email protected]>
Signed-off-by: Vignesh Raghavendra <[email protected]>
Reviewed-by: Michael Walle <[email protected]>
Reviewed-by: Pratyush Yadav <[email protected]>
drivers/mtd/spi-nor/core.c

index 970ed6e3f3ba911f4c0bf9be3f8b04765020f0b5..cc08bd707378f9eb7ce5e29eedbb5820cd92c846 100644 (file)
@@ -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;
        }
 
This page took 0.060171 seconds and 4 git commands to generate.