]> git.ipfire.org Git - thirdparty/linux.git/commit
ASoC: SOF: Intel: hda-dai: Ensure DAI widget is valid during params
authorBard Liao <yung-chuan.liao@linux.intel.com>
Tue, 3 Dec 2024 10:48:53 +0000 (18:48 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 3 Dec 2024 14:40:57 +0000 (14:40 +0000)
commit569922b82ca660f8b24e705f6cf674e6b1f99cc7
tree8612c8aeea737825239b582592e697b3aa14cb83
parent8359ea9c119570fb5971379655661f77a3aafb1d
ASoC: SOF: Intel: hda-dai: Ensure DAI widget is valid during params

Each cpu DAI should associate with a widget. However, the topology might
not create the right number of DAI widgets for aggregated amps. And it
will cause NULL pointer deference.
Check that the DAI widget associated with the CPU DAI is valid to prevent
NULL pointer deference due to missing DAI widgets in topologies with
aggregated amps.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Link: https://patch.msgid.link/20241203104853.56956-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/hda-dai.c
sound/soc/sof/intel/hda.c