Gustavo A. R. Silva
dbf134f69d
mtd: rawnand: atmel: Fix potential NULL pointer dereference
...
[ Upstream commit fbed20280d912449cfb40c382cb55e3d11502587 ]
There is a potential execution path in which function
of_find_compatible_node() returns NULL. In such a case,
we end up having a NULL pointer dereference when accessing
pointer *nfc_np* in function of_clk_get().
So, we better don't take any chances and fix this by null
checking pointer *nfc_np* before calling of_clk_get().
Addresses-Coverity-ID: 1473052 ("Dereference null return value")
Fixes: f88fc122cc ("mtd: nand: Cleanup/rework the atmel_nand driver")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Acked-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-13 11:08:24 -08:00
..
chips
NAND core changes:
2018-08-11 12:15:19 +02:00
devices
mtd: devices: m25p80: Make sure the buffer passed in op is DMA-able
2018-09-18 10:17:48 +02:00
lpddr
mtd: lpddr: use mtd_device_register()
2018-07-24 07:50:22 +02:00
maps
mtd: maps: gpio-addr-flash: Fix ioremapped size
2018-11-13 11:08:14 -08:00
nand
mtd: rawnand: atmel: Fix potential NULL pointer dereference
2018-11-13 11:08:24 -08:00
parsers
mtd: parsers: trx: add of_match_table with the new DT binding
2018-07-07 10:51:00 +02:00
spi-nor
mtd: spi-nor: fsl-quadspi: Don't let -EINVAL on the bus
2018-11-13 11:08:15 -08:00
tests
treewide: kzalloc() -> kcalloc()
2018-06-12 16:19:22 -07:00
ubi
ubi: expose the volume CRC check skip flag
2018-08-15 00:25:21 +02:00
afs.c
mtd: partitions: make parsers return 'const' partition arrays
2015-12-09 10:21:57 -08:00
ar7part.c
treewide: kzalloc() -> kcalloc()
2018-06-12 16:19:22 -07:00
bcm47xxpart.c
treewide: kzalloc() -> kcalloc()
2018-06-12 16:19:22 -07:00
bcm63xxpart.c
mtd: bcm63xxpart: give width specifier an 'int', not 'size_t'
2016-03-07 13:13:58 -08:00
cmdlinepart.c
mtd: cmdlinepart: Update comment for introduction of OFFSET_CONTINUOUS
2018-05-23 10:08:48 +02:00
ftl.c
treewide: Use array_size() in vmalloc()
2018-06-12 16:19:22 -07:00
inftlcore.c
mtd: nand: Rename nand.h into rawnand.h
2017-08-13 10:11:49 +02:00
inftlmount.c
treewide: kmalloc() -> kmalloc_array()
2018-06-12 16:19:22 -07:00
Kconfig
mtd: Make Kconfig formatting consistent
2018-07-19 23:12:06 +02:00
Makefile
mtd: Move onenand code base to drivers/mtd/nand/onenand
2018-03-15 15:40:37 +01:00
mtd_blkdevs.c
mtd_blkdevs: handle highmem pages
2018-05-11 15:07:58 -06:00
mtdblock.c
mtd: Unconditionally update ->fail_addr and ->addr in part_erase()
2018-03-15 18:22:26 +01:00
mtdblock_ro.c
mtd: Move major number definitions to major.h
2013-11-06 23:32:59 -08:00
mtdchar.c
mtdchar: fix overflows in adjustment of count
2018-07-18 16:46:38 +02:00
mtdconcat.c
treewide: kmalloc() -> kmalloc_array()
2018-06-12 16:19:22 -07:00
mtdcore.c
mtd: Fallback to ->_read/write() when ->_read/write_oob() is missing
2018-07-18 16:44:03 +02:00
mtdcore.h
mtd: move code adding (registering) partitions to the parse_mtd_partitions()
2018-05-07 10:10:47 +02:00
mtdoops.c
treewide: Use array_size() in vmalloc()
2018-06-12 16:19:22 -07:00
mtdpart.c
mtd: partitions: fix unbalanced of_node_get/put()
2018-09-17 16:23:12 +02:00
mtdsuper.c
Rename superblock flags (MS_xyz -> SB_xyz)
2017-11-27 13:05:09 -08:00
mtdswap.c
treewide: Use array_size() in vmalloc()
2018-06-12 16:19:22 -07:00
nftlcore.c
mtd: nand: Rename nand.h into rawnand.h
2017-08-13 10:11:49 +02:00
nftlmount.c
mtd: nftl: remove redundant variable nb_erases
2018-07-07 10:55:05 +02:00
ofpart.c
treewide: kzalloc() -> kcalloc()
2018-06-12 16:19:22 -07:00
redboot.c
mtd: partitions: make parsers return 'const' partition arrays
2015-12-09 10:21:57 -08:00
rfd_ftl.c
treewide: Use array_size() in vmalloc()
2018-06-12 16:19:22 -07:00
sm_ftl.c
treewide: kzalloc() -> kcalloc()
2018-06-12 16:19:22 -07:00
sm_ftl.h
mtd: Stop assuming mtd_erase() is asynchronous
2018-03-15 18:21:07 +01:00
ssfdc.c
treewide: kmalloc() -> kmalloc_array()
2018-06-12 16:19:22 -07:00