Skip to content

Commit

Permalink
Revert "ALSA: usx2y: Fix potential NULL pointer dereference"
Browse files Browse the repository at this point in the history
This reverts commit a2c6433.

Because of recent interactions with developers from @umn.edu, all
commits from them have been recently re-reviewed to ensure if they were
correct or not.

Upon review, this commit was found to be incorrect for the reasons
below, so it must be reverted.  It will be fixed up "correctly" in a
later kernel change.

The original patch was incorrect, and would leak memory if the error
path the patch added was hit.

Cc: Aditya Pakki <pakki001@umn.edu>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20210503115736.2104747-37-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
gregkh committed May 13, 2021
1 parent a28591f commit 4667a6f
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions sound/usb/usx2y/usb_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,7 @@ 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 4667a6f

Please sign in to comment.