linux/drivers/mtd/chips
Andreas Persson 2394e62873 mtd: cfi_cmdset_0002: fix crash when erasing/writing AMD cards
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
2021-07-16 00:49:22 +02:00
..
cfi_cmdset_0001.c mtd: core: Constify buf in mtd_write_user_prot_reg() 2021-04-16 20:30:54 +02:00
cfi_cmdset_0002.c mtd: cfi_cmdset_0002: fix crash when erasing/writing AMD cards 2021-07-16 00:49:22 +02:00
cfi_cmdset_0020.c mtd: cfi: Fix fall-through warnings for Clang 2021-03-11 12:17:39 +01:00
cfi_probe.c mtd: cfi: Add early fixup for S70GL02GS 2018-05-04 09:52:38 +02:00
cfi_util.c mtd: Convert fallthrough comments into statements 2020-03-30 10:14:54 +02:00
chipreg.c mtd: Convert list_for_each to entry variant 2021-06-11 21:05:06 +02:00
fwh_lock.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
gen_probe.c mtd: chips: gen_probe: kill useless initializer in mtd_do_chip_probe() 2019-08-27 17:08:18 +05:30
jedec_probe.c MTD changes: 2018-04-06 12:15:41 -07:00
Kconfig mtd: Replace HTTP links with HTTPS ones 2020-08-02 22:17:19 +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
map_absent.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
map_ram.c mtd: Stop updating erase_info->state and calling mtd_erase_callback() 2018-03-21 09:50:56 +01:00
map_rom.c mtd: remove the get_unmapped_area method 2017-11-13 21:39:18 +01:00