mtd: spi-nor: sfdp: Fix last erase region marking
authorTakahiro Kuwano <Takahiro.Kuwano@infineon.com>
Fri, 2 Oct 2020 05:18:00 +0000 (14:18 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:38:37 +0000 (11:38 +0100)
commitc123b069bbb24ae0a7b64048cc7a94a0e3b20ba0
tree0f13584bead24630a17b04cf7d3c3d4f86e62ddc
parent19009472156e80eaf90016618882b45f0a097846
mtd: spi-nor: sfdp: Fix last erase region marking

commit 9166f4af32db74e1544a2149aef231ff24515ea3 upstream.

The place of spi_nor_region_mark_end() must be moved, because 'i' is
re-used for the index of erase[].

Fixes: b038e8e3be72 ("mtd: spi-nor: parse SFDP Sector Map Parameter Table")
Cc: stable@vger.kernel.org
Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
[ta: Add Fixes tag and Cc to stable]
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Link: https://lore.kernel.org/r/02ce8d84b7989ebee33382f6494df53778dd508e.1601612872.git.Takahiro.Kuwano@infineon.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/spi-nor/sfdp.c