summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorMateusz Gorski <mateusz.gorski@linux.intel.com>2020-07-22 20:35:24 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-09-23 13:59:53 +0300
commit4c2cd38656631c7f1a160bf8361e89bcbde17c3a (patch)
tree03635892536e92ccf29b3ee22f064a5e3e682854 /sound
parentfa678750d166a4bc9ccece80e544936e5873026b (diff)
downloadlinux-4c2cd38656631c7f1a160bf8361e89bcbde17c3a.tar.xz
ASoC: Intel: skl_hda_dsp_generic: Fix NULLptr dereference in autosuspend delay
[ Upstream commit 5610921a4435ef45c33702073e64f835f3dca7f1 ] Different modules for HDMI codec are used depending on the "hda_codec_use_common_hdmi" option being enabled or not. Driver private context for both of them is different. This leads to null-pointer dereference error when driver tries to set autosuspend delay for HDMI codec while the option is off (hdac_hdmi module is used for HDMI). Change the string in conditional statement to "ehdaudio0D0" to ensure that only the HDAudio codec is handled by this function. Fixes: 5bf73b1b1dec ("ASoC: intel/skl/hda - fix oops on systems without i915 audio codec") Signed-off-by: Mateusz Gorski <mateusz.gorski@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200722173524.30161-1-mateusz.gorski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/intel/boards/skl_hda_dsp_generic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/intel/boards/skl_hda_dsp_generic.c b/sound/soc/intel/boards/skl_hda_dsp_generic.c
index ca4900036ead..bc50eda297ab 100644
--- a/sound/soc/intel/boards/skl_hda_dsp_generic.c
+++ b/sound/soc/intel/boards/skl_hda_dsp_generic.c
@@ -181,7 +181,7 @@ static void skl_set_hda_codec_autosuspend_delay(struct snd_soc_card *card)
struct snd_soc_dai *dai;
for_each_card_rtds(card, rtd) {
- if (!strstr(rtd->dai_link->codecs->name, "ehdaudio"))
+ if (!strstr(rtd->dai_link->codecs->name, "ehdaudio0D0"))
continue;
dai = asoc_rtd_to_codec(rtd, 0);
hda_pvt = snd_soc_component_get_drvdata(dai->component);