net/ipa: ipa_resource: Fix wrong for loop range

[ Upstream commit 27df68d579 ]

The source group count was mistakenly assigned to both dst and src loops.
Fix it to make IPA probe and work again.

Fixes: 4fd704b360 ("net: ipa: record number of groups in data")
Acked-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Link: https://lore.kernel.org/r/20211111183724.593478-1-konrad.dybcio@somainline.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Konrad Dybcio 2021-11-11 19:37:24 +01:00 коммит произвёл Greg Kroah-Hartman
Родитель e9fd893811
Коммит f4d1328e6e
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -52,7 +52,7 @@ static bool ipa_resource_limits_valid(struct ipa *ipa,
return false; return false;
} }
group_count = data->rsrc_group_src_count; group_count = data->rsrc_group_dst_count;
if (!group_count || group_count > IPA_RESOURCE_GROUP_MAX) if (!group_count || group_count > IPA_RESOURCE_GROUP_MAX)
return false; return false;