summaryrefslogtreecommitdiff
path: root/sound/hda
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-03-16 00:05:00 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2019-03-16 00:05:00 +0300
commit2dbb0e6c1961d823354c12bc1b66b005d1c78092 (patch)
tree166732407ebb9bfac32e4d23044ad300d9b867be /sound/hda
parent8264fd046a0884d6bf475a784412978dbbd93175 (diff)
parentda484d00f020af3dd7cfcc6c4b69a7f856832883 (diff)
downloadlinux-2dbb0e6c1961d823354c12bc1b66b005d1c78092.tar.xz
Merge tag 'sound-fix-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "Some cleaning after the first batch; mostly about HD-audio quirks but also some NULL dereference fixes in corner cases and a random build error fix, too" * tag 'sound-fix-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek - Add support headset mode for New DELL WYSE NB ALSA: hda/realtek - Add support headset mode for DELL WYSE AIO ALSA: hda/realtek: merge alc_fixup_headset_jack to alc295_fixup_chromebook ALSA: pcm: Fix function name in kernel-doc comment ALSA: hda: hdmi - add Icelake support ALSA: hda - add more quirks for HP Z2 G4 and HP Z240 ALSA: hda/realtek - Fixed Headset Mic JD not stable ALSA: hda/realtek: Enable headset MIC of Acer TravelMate X514-51T with ALC255 ALSA: hda/tegra: avoid build error without CONFIG_PM ALSA: usx2y: Fix potential NULL pointer dereference ALSA: hda: Avoid NULL pointer dereference at snd_hdac_stream_start()
Diffstat (limited to 'sound/hda')
-rw-r--r--sound/hda/hdac_stream.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/hda/hdac_stream.c b/sound/hda/hdac_stream.c
index f5dd288d1a7a..76e9b41fcea2 100644
--- a/sound/hda/hdac_stream.c
+++ b/sound/hda/hdac_stream.c
@@ -95,7 +95,10 @@ void snd_hdac_stream_start(struct hdac_stream *azx_dev, bool fresh_start)
1 << azx_dev->index,
1 << azx_dev->index);
/* set stripe control */
- stripe_ctl = snd_hdac_get_stream_stripe_ctl(bus, azx_dev->substream);
+ if (azx_dev->substream)
+ stripe_ctl = snd_hdac_get_stream_stripe_ctl(bus, azx_dev->substream);
+ else
+ stripe_ctl = 0;
snd_hdac_stream_updateb(azx_dev, SD_CTL_3B, SD_CTL_STRIPE_MASK,
stripe_ctl);
/* set DMA start and interrupt mask */