summaryrefslogtreecommitdiff
path: root/sound/usb/pcm.c
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2023-01-09 17:11:33 +0300
committerTakashi Iwai <tiwai@suse.de>2023-01-09 18:05:21 +0300
commit291e9da91403e0e628d7692b5ed505100e7b7706 (patch)
tree06dd013198507049cebd15dd85f961d402075c36 /sound/usb/pcm.c
parentae50e2ab122cef68f46b7799fb9deffe3334f5e2 (diff)
downloadlinux-291e9da91403e0e628d7692b5ed505100e7b7706.tar.xz
ALSA: usb-audio: Always initialize fixed_rate in snd_usb_find_implicit_fb_sync_format()
Handle the fallback code path, too. Fixes: fd28941cff1c ("ALSA: usb-audio: Add new quirk FIXED_RATE for JBL Quantum810 Wireless") BugLink: https://lore.kernel.org/alsa-devel/Y7frf3N%2FxzvESEsN@kili/ Reported-by: Dan Carpenter <error27@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Jaroslav Kysela <perex@perex.cz> Link: https://lore.kernel.org/r/20230109141133.335543-1-perex@perex.cz Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/pcm.c')
-rw-r--r--sound/usb/pcm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index fbd4798834e5..1f72960d0d53 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -163,6 +163,8 @@ bool snd_usb_pcm_has_fixed_rate(struct snd_usb_substream *subs)
struct snd_usb_audio *chip = subs->stream->chip;
int rate = -1;
+ if (!subs)
+ return false;
if (!(chip->quirk_flags & QUIRK_FLAG_FIXED_RATE))
return false;
list_for_each_entry(fp, &subs->fmt_list, list) {