Home
last modified time | relevance | path

Searched hist:"6 b540ac7" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/sound/soc/intel/boards/
H A Dsof_sdw_hdmi.c6b540ac7 Fri Jul 17 16:13:35 CDT 2020 Kai Vehmanen <kai.vehmanen@linux.intel.com> 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: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Link: https://lore.kernel.org/r/20200717211337.31956-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6b540ac7 Fri Jul 17 16:13:35 CDT 2020 Kai Vehmanen <kai.vehmanen@linux.intel.com> 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: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Link: https://lore.kernel.org/r/20200717211337.31956-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>