linux-stable/drivers/mtd/spi-nor
Sergei Shtylyov 35c5980366 mtd: spi-nor: fix silent truncation in spi_nor_read_raw()
commit 3d63ee5deb upstream.

spi_nor_read_raw() assigns the result of 'ssize_t spi_nor_read_data()'
to the 'int ret' variable, while 'ssize_t' is a 64-bit type and *int*
is a 32-bit type on the 64-bit machines. This silent truncation isn't
really valid, so fix up the variable's type.

Fixes: f384b352cb ("mtd: spi-nor: parse Serial Flash Discoverable Parameters (SFDP) tables")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-17 19:47:12 +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: Use proper enum for dma_[un]map_single 2019-11-24 08:20:41 +01:00
fsl-quadspi.c mtd: spi-nor: fsl-quadspi: Don't let -EINVAL on the bus 2018-11-13 11:08:15 -08: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-11-13 11:08:15 -08:00
intel-spi-platform.c
intel-spi.c mtd: spi-nor: intel-spi: Avoid crossing 4K address boundary on read/write 2019-05-22 07:37:41 +02:00
intel-spi.h
Kconfig mtd: atmel-quadspi: disallow building on ebsa110 2019-01-09 17:38:37 +01:00
Makefile
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: fix silent truncation in spi_nor_read_raw() 2020-01-17 19:47:12 +01:00
stm32-quadspi.c mtd: spi-nor: stm32-quadspi: replace "%p" with "%pK" 2018-08-01 09:18:55 +02:00