hal: initialize the cal data structure in set and get cal functions

Initialize the cal data structure in set_audiocal and get_audiocal
fucntions to avoid garbage values to be set/get in calibration.

CRs-Fixed: 2144479
Change-Id: I0012ce39264abbd8b2f4c6ef6af9cd29ed1e3530
This commit is contained in:
Aditya Bavanari 2017-11-15 12:48:36 +05:30
parent 9dff3597ae
commit e293d5b85c
2 changed files with 6 additions and 0 deletions

View File

@ -4831,6 +4831,7 @@ static void set_audiocal(void *platform, struct str_parms *parms, char *value, i
goto done_key_audcal;
}
memset(&cal, 0, sizeof(acdb_audio_cal_cfg_t));
/* parse audio calibration keys */
ret = parse_audiocal_cfg(parms, &cal);
@ -5124,6 +5125,8 @@ static void get_audiocal(void *platform, void *keys, void *pReply) {
ret=-EINVAL;
goto done;
}
memset(&cal, 0, sizeof(acdb_audio_cal_cfg_t));
/* parse audiocal configuration keys */
ret = parse_audiocal_cfg(query, &cal);
if(ret == 0) {

View File

@ -4616,6 +4616,7 @@ static void set_audiocal(void *platform, struct str_parms *parms, char *value, i
goto done_key_audcal;
}
memset(&cal, 0, sizeof(acdb_audio_cal_cfg_t));
/* parse audio calibration keys */
ret = parse_audiocal_cfg(parms, &cal);
@ -4992,6 +4993,8 @@ static void get_audiocal(void *platform, void *keys, void *pReply) {
ret=-EINVAL;
goto done;
}
memset(&cal, 0, sizeof(acdb_audio_cal_cfg_t));
/* parse audiocal configuration keys */
ret = parse_audiocal_cfg(query, &cal);
if(ret == 0) {