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

Commit fba2ac97 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: Check the pointers before memcpy"

parents 8383e421 7da558b7
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1616,11 +1616,17 @@ static int msm_compr_get_caps(struct snd_compr_stream *cstream,
{
	struct snd_compr_runtime *runtime = cstream->runtime;
	struct msm_compr_audio *prtd = runtime->private_data;
	int ret = 0;

	pr_debug("%s\n", __func__);
	if ((arg != NULL) && (prtd != NULL)) {
		memcpy(arg, &prtd->compr_cap, sizeof(struct snd_compr_caps));
	} else {
		ret = -EINVAL;
		pr_err("%s: arg (0x%p), prtd (0x%p)\n", __func__, arg, prtd);
	}

	return 0;
	return ret;
}

static int msm_compr_get_codec_caps(struct snd_compr_stream *cstream,