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: Damir Didjusto <damird@codeaurora.org>
This commit is contained in:
Damir Didjusto 2014-04-30 12:01:44 -07:00 committed by Gerrit - the friendly Code Review server
parent 8aa4fe3554
commit 833e0ee83a

View file

@ -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;
}