Commit e397924
mtd: spi-nor: Reset nor->addr_width when SFDP parsing failed
Commit 5390a8d ("mtd: spi-nor: add support to non-uniform SFDP SPI
NOR flash memories") removed the 'nor->addr_width = 0;' statement when
spi_nor_parse_sfdp() returns an error, thus leaving ->addr_width in an
undefined state which can cause trouble when spi_nor_scan() checks its
value.
Reported-by: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>
Fixes: 5390a8d ("mtd: spi-nor: add support to non-uniform SFDP SPI NOR flash memories")
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
(cherry picked from commit 90c31cb)
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>1 parent 1f9ce7e commit e397924
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3190 | 3190 | | |
3191 | 3191 | | |
3192 | 3192 | | |
3193 | | - | |
| 3193 | + | |
| 3194 | + | |
3194 | 3195 | | |
3195 | 3196 | | |
3196 | 3197 | | |
3197 | | - | |
| 3198 | + | |
3198 | 3199 | | |
| 3200 | + | |
3199 | 3201 | | |
3200 | 3202 | | |
3201 | 3203 | | |
| |||
0 commit comments