Skip to content
Commit 90c31cb9 authored by Boris Brezillon's avatar Boris Brezillon
Browse files

mtd: spi-nor: Reset nor->addr_width when SFDP parsing failed



Commit 5390a8df ("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: default avatarCyrille Pitchen <cyrille.pitchen@wedev4u.fr>
Fixes: 5390a8df ("mtd: spi-nor: add support to non-uniform SFDP SPI NOR flash memories")
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: default avatarTudor Ambarus <tudor.ambarus@microchip.com>
parent 91d7b670
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