1
0
Fork 0

Revert "Revert "ALSA: usx2y: Fix potential NULL pointer dereference""

commit 27b57bb76a upstream.

This reverts commit 4667a6fc17.

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>
pull/363/head^2
Greg Kroah-Hartman 2021-05-13 21:40:38 +02:00
parent 899b5131e7
commit 0e3045c15f
1 changed files with 5 additions and 0 deletions

View File

@ -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) ||