]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: qcom: q6dsp: Fix an off-by-one in q6adm_alloc_copp()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 21 Jul 2022 09:02:22 +0000 (11:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:24:10 +0000 (14:24 +0200)
commit8c23aaa3aad3a0b3b3e98c03a1fd8b4aaffa0364
tree98a051e7044f51604fedb8fa47c65fe73174cf5a
parent14db350f6792ace5de1682732fa0c5df4000a265
ASoC: qcom: q6dsp: Fix an off-by-one in q6adm_alloc_copp()

[ Upstream commit 99e398a8ff7104482fed345b1208ad3f2aece8bd ]

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: 5285a55a4a8f ("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>
sound/soc/qcom/qdsp6/q6adm.c