ASoC: intel: sof_sdw: Check link mask validity in get_dailink_info
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Tue, 8 Aug 2023 13:20:04 +0000 (14:20 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 8 Aug 2023 17:57:17 +0000 (18:57 +0100)
commite1cfd5fef3d6eaf0ddbc54da70ddf54462b23592
treefa0a896384ccceaaf732abe3599ce2a791eafb79
parent3003ea9cb7bd6399ca9962e0b3dd0ac58b151c2e
ASoC: intel: sof_sdw: Check link mask validity in get_dailink_info

As get_dailink_info spins through all the links anyway simply check the
link masks there. This saves an extra check and means the code will
fail earlier if the mask is invalid.

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230808132013.889419-3-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/sof_sdw.c