Skip to content

Commit

Permalink
Revert "Revert "ALSA: usx2y: Fix potential NULL pointer dereference""
Browse files Browse the repository at this point in the history
commit 27b57bb upstream.

This reverts commit 4667a6f.

Takashi writes:
	I have already started working on the bigger cleanup of this driver
	code based on 5.13-rc1, so could you drop this revert?

I missed our previous discussion about this, my fault for applying it.

Reported-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
gregkh committed Jun 3, 2021
1 parent f3c4fca commit 5d51d34
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sound/usb/usx2y/usb_stream.c
Expand Up @@ -91,7 +91,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) ||
Expand Down

0 comments on commit 5d51d34

Please sign in to comment.