Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ee349d7f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: msm: qdsp6v2: check if buf is null before using it"

parents bc7d3197 bf7efaef
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -198,6 +198,11 @@ void wcd_clsh_imped_config(struct snd_soc_codec *codec, int imped, bool reset)
		pr_debug("%s, impedance not in range = %d\n", __func__, imped);
		return;
	}
	if (index >= ARRAY_SIZE(imped_table)) {
		pr_debug("%s, impedance index not in range = %d\n", __func__,
			index);
		return;
	}
	for (i = 0; i < MAX_IMPED_PARAMS; i++)
		snd_soc_update_bits(codec, imped_table[index][i].reg,
				imped_table[index][i].mask,
+5 −0
Original line number Diff line number Diff line
@@ -375,6 +375,11 @@ static int msm_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
		q6asm_cmd(prtd->audio_client, CMD_PAUSE);
		q6asm_cmd(prtd->audio_client, CMD_FLUSH);
		buf = q6asm_shared_io_buf(prtd->audio_client, dir);
		if (buf == NULL) {
			pr_err("%s: shared IO buffer is null\n", __func__);
			ret = -EINVAL;
			break;
		}
		memset(buf->data, 0, buf->actual_size);
		break;
	case SNDRV_PCM_TRIGGER_SUSPEND: