asoc: clean KWissue warnings

Add change in q6asm.c to fix uninitialized warning.
Add change in msm-pcm-routing-v2.c to fix out of range warning

Change-Id: I9d29b3cfd3f57ebf07d28ecd775759495b4b3a70
Signed-off-by: Hexuan Zhu <hexuzhu@codeaurora.org>
This commit is contained in:
Hexuan Zhu 2021-04-27 14:32:22 +08:00 • committed by Gerrit - the friendly Code Review server
commit 2b79066d24
2 changed files with 4 additions and 4 deletions

View file

@ -1426,7 +1426,7 @@ int msm_pcm_routing_set_stream_ec_ref_chmix_cfg(
pr_debug("%s: ch[%d][%d] weight = %d",
__func__, i, j, cfg_data->channel_weight[i][j]);
if (fedai_id < 0 || fedai_id > MSM_FRONTEND_DAI_MAX) {
if (fedai_id < 0 || fedai_id >= MSM_FRONTEND_DAI_MAX) {
pr_err("%s: Received out of bounds fedai_id %d\n",
__func__, fedai_id);
ret = -EINVAL;

View file

@ -3546,7 +3546,7 @@ static int q6asm_open_read_version_adaptor(struct audio_client *ac,
int q6asm_open_read_with_retry(struct audio_client *ac, uint32_t format,
uint16_t bits_per_sample, bool ts_mode)
{
int i, rc;
int i = 0, rc = 0;
mutex_lock(&session_lock);
for (i = 0; i < ASM_ACTIVE_STREAMS_ALLOWED; i++) {
@ -3921,7 +3921,7 @@ static int q6asm_open_write_version_adaptor(struct audio_client *ac,
int q6asm_open_write_with_retry(struct audio_client *ac, uint32_t format,
uint16_t bits_per_sample)
{
int i, rc;
int i = 0, rc = 0;
mutex_lock(&session_lock);
for (i = 0; i < ASM_ACTIVE_STREAMS_ALLOWED; i++) {
@ -4366,7 +4366,7 @@ EXPORT_SYMBOL(q6asm_open_loopback_v2);
int q6asm_open_loopback_with_retry(struct audio_client *ac,
uint16_t bits_per_sample)
{
int i, rc;
int i = 0, rc = 0;
mutex_lock(&session_lock);
for (i = 0; i < ASM_ACTIVE_STREAMS_ALLOWED; i++) {