ASoC: Intel: avs: Fix possible null-ptr-deref when initing hw
authorCezary Rojewski <cezary.rojewski@intel.com>
Fri, 30 May 2025 14:10:20 +0000 (16:10 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 2 Jun 2025 11:26:47 +0000 (12:26 +0100)
commit2f78724d4f0c665c83e202e3989d5333a2cb1036
treee2a3d25c5a5fd7aa74e9d2cb6554deed6ef509c4
parent347c8d6db7c9d65d93ef226849b273823f54eaea
ASoC: Intel: avs: Fix possible null-ptr-deref when initing hw

Search result of avs_dai_find_path_template() shall be verified before
being used. As 'template' is already known when
avs_hw_constraints_init() is fired, drop the search entirely.

Fixes: f2f847461fb7 ("ASoC: Intel: avs: Constrain path based on BE capabilities")
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250530141025.2942936-5-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/avs/pcm.c