ASoC: wcd_cpe_core: Initialize variables before use

Initialize variable before use to avoid
invalid memory access.

CRs-fixed: 2004067
Change-Id: I882cdf78709d6dcc2dcd1fc7f903492aa2581138
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
This commit is contained in:
Karthikeyan Mani 2017-02-23 11:49:50 -08:00 committed by Gerrit - the friendly Code Review server
parent 9898f867d9
commit 075b17a1d2

View file

@ -3556,6 +3556,8 @@ static int wcd_cpe_lsm_lab_control(
pr_debug("%s: enter payload_size = %d Enable %d\n",
__func__, pld_size, enable);
memset(&cpe_lab_enable, 0, sizeof(cpe_lab_enable));
if (fill_lsm_cmd_header_v0_inband(&cpe_lab_enable.hdr, session->id,
(u8) pld_size, CPE_LSM_SESSION_CMD_SET_PARAMS_V2)) {
return -EINVAL;