Re: [U-Boot] [PATCH] nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

2018-12-06 Thread Stefan Agner
On 03.12.2018 10:20, Lukasz Majewski wrote: > 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->_g

[U-Boot] [PATCH] nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

2018-12-03 Thread Lukasz Majewski
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 val