OrangePi_CM5/drivers/mtd
Andreas Persson 779a0f4347 mtd: cfi_cmdset_0002: fix crash when erasing/writing AMD cards
commit 2394e628738933aa014093d93093030f6232946d upstream.

Erasing an AMD linear flash card (AM29F016D) crashes after the first
sector has been erased. Likewise, writing to it crashes after two bytes
have been written. The reason is a missing check for a null pointer -
the cmdset_priv field is not set for this type of card.

Fixes: 4844ef8030 ("mtd: cfi_cmdset_0002: Add support for polling status register")
Signed-off-by: Andreas Persson <andreasp56@outlook.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/DB6P189MB05830B3530B8087476C5CFE4C1159@DB6P189MB0583.EURP189.PROD.OUTLOOK.COM
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26 08:35:33 -04:00
..
chips mtd: cfi_cmdset_0002: fix crash when erasing/writing AMD cards 2021-08-26 08:35:33 -04:00
devices
…
hyperbus
…
lpddr
…
maps mtd: maps: fix error return code of physmap_flash_remove() 2021-05-14 09:50:09 +02:00
nand mtd: rawnand: marvell: add missing clk_disable_unprepare() on error in marvell_nfc_resume() 2021-07-14 16:56:47 +02:00
parsers mtd: partitions: redboot: seek fis-index-block in the right node 2021-07-14 16:56:38 +02:00
spi-nor Revert "mtd: spi-nor: macronix: Add support for mx25l51245g" 2021-05-11 14:47:13 +02:00
tests
…
ubi
…
Kconfig
…
Makefile
…
ftl.c
…
inftlcore.c
…
inftlmount.c
…
mtd_blkdevs.c
…
mtdblock.c
…
mtdblock_ro.c
…
mtdchar.c mtd: require write permissions for locking and badblock ioctls 2021-05-14 09:50:13 +02:00
mtdconcat.c
…
mtdcore.c mtd: Handle possible -EPROBE_DEFER from parse_mtd_partitions() 2021-05-14 09:50:09 +02:00
mtdcore.h
…
mtdoops.c
…
mtdpart.c mtd: don't lock when recursively deleting partitions 2021-05-14 09:50:09 +02:00
mtdpstore.c
…
mtdsuper.c
…
mtdswap.c
…
nftlcore.c
…
nftlmount.c
…
rfd_ftl.c
…
sm_ftl.c
…
sm_ftl.h
…
ssfdc.c
…