Skip to content
Commit 2842dc9b authored by Muhammad Usama Anjum's avatar Muhammad Usama Anjum Committed by Miquel Raynal
Browse files

mtd: spi-nor: core: correct type of i

The i should be signed to find out the end of the loop. Otherwise,
i >= 0 is always true and loop becomes infinite. Make its type to be
int.

Fixes: 6a9eda34

 ("mtd: spi-nor: core: set mtd->eraseregions for non-uniform erase map")
Signed-off-by: default avatarMuhammad Usama Anjum <usama.anjum@collabora.com>
Reviewed-by: default avatarTudor Ambarus <tudor.ambarus@linaro.org>
Reviewed-by: default avatarMichael Walle <mwalle@kernel.org>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240304090103.818092-1-usama.anjum@collabora.com
parent 8c8d25d9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment