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

Commit 24d689bb authored by Ramjee Singh's avatar Ramjee Singh Committed by ssizon
Browse files

asoc: Check backend index to apply channel map



Check valid range for backend index to apply backend
channel map.

Change-Id: I6fb14d7fba128f6bd846b39dabace43c39e81307
Signed-off-by: default avatarRamjee Singh <ramjee@codeaurora.org>
parent b203242a
Loading
Loading
Loading
Loading
+5 −4
Original line number Original line Diff line number Diff line
@@ -17463,8 +17463,9 @@ static int msm_routing_put_port_chmap_mixer(struct snd_kcontrol *kcontrol,
	uint32_t be_idx = ucontrol->value.integer.value[0];
	uint32_t be_idx = ucontrol->value.integer.value[0];
	int i;
	int i;
        if (be_idx >= MSM_BACKEND_DAI_MAX) {
	if (be_idx < 0 || be_idx >= MSM_BACKEND_DAI_MAX) {
            pr_err("%s: Invalid Backend index %d\n", __func__, be_idx);
		pr_err("%s: Invalid Backend ID %d\n",
			__func__, be_idx);
		return -EINVAL;
		return -EINVAL;
	}
	}