volume: use rzalloc for component new

Replace rmalloc() with rzalloc() to make sure the new
allocated structs are clear to all 0s.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
This commit is contained in:
Keyon Jie 2017-01-10 17:01:03 +08:00 committed by Liam Girdwood
parent 75eee17e0c
commit b9bd368186
1 changed files with 2 additions and 2 deletions

View File

@ -306,11 +306,11 @@ static struct comp_dev *volume_new(uint32_t type, uint32_t index,
struct comp_data *cd;
int i;
dev = rmalloc(RZONE_MODULE, RMOD_SYS, sizeof(*dev));
dev = rzalloc(RZONE_MODULE, RMOD_SYS, sizeof(*dev));
if (dev == NULL)
return NULL;
cd = rmalloc(RZONE_MODULE, RMOD_SYS, sizeof(*cd));
cd = rzalloc(RZONE_MODULE, RMOD_SYS, sizeof(*cd));
if (cd == NULL) {
rfree(RZONE_MODULE, RMOD_SYS, dev);
return NULL;