OpenCloudOS-Kernel/drivers/mtd/spi-nor
Boris Brezillon 90c31cb9a8 mtd: spi-nor: Reset nor->addr_width when SFDP parsing failed
Commit 5390a8df76 ("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: 5390a8df76 ("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>
2018-11-05 23:52:40 +01:00
..
Kconfig Core changes: 2018-06-07 22:53:15 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
aspeed-smc.c treewide: Use struct_size() for devm_kmalloc() and friends 2018-06-06 11:15:43 -07:00
atmel-quadspi.c mtd: spi-nor: atmel-quadspi: Include gpio/consumer.h instead of gpio.h 2018-08-01 09:27:23 +02:00
cadence-quadspi.c mtd: spi-nor: cadence-quadspi: Return error code in cqspi_direct_read_execute() 2018-11-05 23:52:18 +01:00
fsl-quadspi.c mtd: spi-nor: fsl-quadspi: fix read error for flash size larger than 16MB 2018-10-12 11:48:19 +02:00
hisi-sfc.c mtd: spi-nor: hisi: Avoid generic function names 2018-04-20 22:54:36 +02:00
intel-spi-pci.c mtd: spi-nor: intel-spi: Add support for Intel Ice Lake SPI serial flash 2018-10-12 11:47:07 +02:00
intel-spi-platform.c spi-nor: Add support for Intel SPI serial flash controller 2017-01-03 17:33:36 +00:00
intel-spi.c mtd: spi-nor: intel-spi: use mtd_device_register() 2018-08-01 09:18:55 +02:00
intel-spi.h spi-nor: Add support for Intel SPI serial flash controller 2017-01-03 17:33:36 +00:00
mtk-quadspi.c mtd: mtk-nor: modify functions' name more generally 2018-01-14 16:14:06 +01:00
nxp-spifi.c mtd: spi-nor: nxp-spifi: release flash_np in nxp_spifi_probe() 2018-06-22 00:26:06 +02:00
spi-nor.c mtd: spi-nor: Reset nor->addr_width when SFDP parsing failed 2018-11-05 23:52:40 +01:00
stm32-quadspi.c mtd: spi-nor: stm32-quadspi: replace "%p" with "%pK" 2018-08-01 09:18:55 +02:00