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

Commit 6b3783e3 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: error check for backend index and MCLK src"

parents c5337ea0 b45e776c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -31245,12 +31245,12 @@ static int msm_routing_put_mclk_src_cfg(struct snd_kcontrol *kcontrol,
	mclk_src_id = ucontrol->value.integer.value[1];
	mclk_freq = ucontrol->value.integer.value[2];
	if (be_idx < 0 && be_idx >= MSM_BACKEND_DAI_MAX) {
	if (be_idx < 0 || be_idx >= MSM_BACKEND_DAI_MAX) {
		pr_err("%s: Invalid be id %d\n", __func__, be_idx);
		return -EINVAL;
	}
	if (mclk_src_id < MCLK_SRC_INT && mclk_src_id >= MCLK_SRC_MAX) {
	if (mclk_src_id < MCLK_SRC_INT || mclk_src_id >= MCLK_SRC_MAX) {
		pr_err("%s: Invalid MCLK src %d\n", __func__, mclk_src_id);
		return -EINVAL;
	}