From ff83a9e205c4445ae4239aca21b9d922db7ddf44 Mon Sep 17 00:00:00 2001 From: Vatsal Bucha Date: Tue, 24 Sep 2019 00:33:42 +0530 Subject: [PATCH] dsp: Change condition for cal_data for v_vali_param V-Validation is not working due to different size for cal_data and data_size. This is expected as same callbacks are used for ftm and v validation. Change condition to ensure data_size is less than or equal to size of cal_data. Change-Id: I78b4e6778de9cfa5f95830fc6d48b84e608ba3a5 Signed-off-by: Vatsal Bucha --- dsp/q6afe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dsp/q6afe.c b/dsp/q6afe.c index 9709772ab88b..8120536b916b 100644 --- a/dsp/q6afe.c +++ b/dsp/q6afe.c @@ -8521,7 +8521,7 @@ static int afe_set_cal_sp_th_vi_cfg(int32_t cal_type, size_t data_size, uint32_t mode; if (cal_data == NULL || - data_size != sizeof(*cal_data) || + data_size > sizeof(*cal_data) || this_afe.cal_data[AFE_FB_SPKR_PROT_TH_VI_CAL] == NULL) goto done; @@ -8665,7 +8665,7 @@ static int afe_get_cal_sp_th_vi_param(int32_t cal_type, size_t data_size, int ret = 0; if (cal_data == NULL || - data_size != sizeof(*cal_data) || + data_size > sizeof(*cal_data) || this_afe.cal_data[AFE_FB_SPKR_PROT_TH_VI_CAL] == NULL) return 0;