Skip to content
Unverified Commit 6b540ac7 authored by Kai Vehmanen's avatar Kai Vehmanen Committed by Mark Brown
Browse files

ASoC: Intel: sof_sdw: avoid crash if invalid DSP topology loaded



The mc_private->hdmi_pcm_list is populated by elements loaded during
DSP topology load. Valid topologies for this machine driver will always
have PCM nodes for HDMI, but driver should fail gracefully even in the case
this is not true. Add a sanity check to sof_sdw_hdmi_card_late_probe()
for this case. Without the fix, a null pcm handle gets dereferenced.

Signed-off-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: default avatarRander Wang <rander.wang@linux.intel.com>
Link: https://lore.kernel.org/r/20200717211337.31956-5-pierre-louis.bossart@linux.intel.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 15ef2ea0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment