ASoC: qcom: q6dsp: Fix an off-by-one in q6adm_alloc_copp()
stable inclusion from stable-v5.10.137 commit 60e494b4d5784e83314ac00f72ce8e1e4c9f29f7 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I60PLB Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=60e494b4d5784e83314ac00f72ce8e1e4c9f29f7 -------------------------------- [ Upstream commit 673f58f6 ] find_first_zero_bit() returns MAX_COPPS_PER_PORT at max here. So 'idx' should be tested with ">=" or the test can't match. Fixes: 7b20b2be ("ASoC: qdsp6: q6adm: Add q6adm driver") Signed-off-by:Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/0fca3271649736053eb9649d87e1ca01b056be40.1658394124.git.christophe.jaillet@wanadoo.fr Signed-off-by:
Mark Brown <broonie@kernel.org> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com> Reviewed-by:
Wei Li <liwei391@huawei.com>
Loading
Please sign in to comment