Unverified Commit 4ee6fc27 authored by Bard Liao's avatar Bard Liao Committed by Mark Brown
Browse files

ASoC: SOF: ipc4-topology: fix alh_group_ida max value



group_id is from 0 ~ ALH_MULTI_GTW_COUNT - 1, not 0 ~
ALH_MULTI_GTW_COUNT.

Fixes: a150345a ("ASoC: SOF: ipc4-topology: add SoundWire/ALH aggregation support")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarRander Wang <rander.wang@intel.com>
Signed-off-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220822190211.170537-1-pierre-louis.bossart@linux.intel.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 5c5c2baa
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1251,7 +1251,7 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
			if (blob->alh_cfg.count > 1) {
			if (blob->alh_cfg.count > 1) {
				int group_id;
				int group_id;


				group_id = ida_alloc_max(&alh_group_ida, ALH_MULTI_GTW_COUNT,
				group_id = ida_alloc_max(&alh_group_ida, ALH_MULTI_GTW_COUNT - 1,
							 GFP_KERNEL);
							 GFP_KERNEL);


				if (group_id < 0)
				if (group_id < 0)