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

Commit 833e0ee8 authored by Damir Didjusto's avatar Damir Didjusto Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: msm: qdsp6v2: Fix the boundary check for COPP



Fix the boundary check for the array that holds the COPP
information.

Change-Id: Ie0bbaf25aae25e722ebefac434b00c05b8a0a2c6
Signed-off-by: default avatarDamir Didjusto <damird@codeaurora.org>
parent 8aa4fe35
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1728,7 +1728,7 @@ int adm_close(int port_id, int perf_mode, int copp_idx)
		return -EINVAL;
	}

	if ((copp_idx < 0) || (copp_idx > MAX_COPPS_PER_PORT)) {
	if ((copp_idx < 0) || (copp_idx >= MAX_COPPS_PER_PORT)) {
		pr_err("%s: Invalid copp idx: %d\n", __func__, copp_idx);
		return -EINVAL;
	}