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:
parent
9898f867d9
commit
075b17a1d2
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue