
18 Dec
2013
18 Dec
'13
4:22 p.m.
On Wed, 2013-12-18 at 09:08 -0600, Chin Liang See wrote:
To enhance the SDMMC DesignWare driver to use calloc instead of malloc. This will avoid the incident that uninitialized members of mmc structure are later used for NULL comparison.
IMHO pretty sane change.
Actually I had local memset right after this malloc to make sure all members are zeroed.
But with this change we have a clean structure right away.
I'm wondering why "calloc" is not used in every driver for device specific structure allocation.
-Alexey