summaryrefslogtreecommitdiff
path: root/sound/usb/usx2y/usb_stream.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-03-15 14:05:00 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-03-15 14:05:00 -0700
commit2dbb0e6c1961d823354c12bc1b66b005d1c78092 (patch)
tree166732407ebb9bfac32e4d23044ad300d9b867be /sound/usb/usx2y/usb_stream.c
parent8264fd046a0884d6bf475a784412978dbbd93175 (diff)
parentda484d00f020af3dd7cfcc6c4b69a7f856832883 (diff)
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/usb/usx2y/usb_stream.c')
-rw-r--r--sound/usb/usx2y/usb_stream.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/usb/usx2y/usb_stream.c b/sound/usb/usx2y/usb_stream.c
index b0f8979ff2d2..221adf68bd0c 100644
--- a/sound/usb/usx2y/usb_stream.c
+++ b/sound/usb/usx2y/usb_stream.c
@@ -104,7 +104,12 @@ static int init_urbs(struct usb_stream_kernel *sk, unsigned use_packsize,
for (u = 0; u < USB_STREAM_NURBS; ++u) {
sk->inurb[u] = usb_alloc_urb(sk->n_o_ps, GFP_KERNEL);
+ if (!sk->inurb[u])
+ return -ENOMEM;
+
sk->outurb[u] = usb_alloc_urb(sk->n_o_ps, GFP_KERNEL);
+ if (!sk->outurb[u])
+ return -ENOMEM;
}
if (init_pipe_urbs(sk, use_packsize, sk->inurb, indata, dev, in_pipe) ||