u-boot-brain/drivers/mtd/nand
Lukasz Majewski 254409dbe8 nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc
Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>
2019-01-01 14:12:18 +01:00
..
raw nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc 2019-01-01 14:12:18 +01:00
spi mtd: nand: spi: Add Gigadevice SPI NAND support 2018-10-04 18:24:24 +05:30
bbt.c mtd: nand: Add core infrastructure to deal with NAND devices 2018-09-20 20:10:49 +05:30
core.c mtd: nand: Add core infrastructure to deal with NAND devices 2018-09-20 20:10:49 +05:30
Kconfig mtd: nand: Add core infrastructure to support SPI NANDs 2018-09-20 20:10:49 +05:30
Makefile mtd: nand: Add core infrastructure to support SPI NANDs 2018-09-20 20:10:49 +05:30