Commit d3598bb2 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] usbtest catch -ENOMEM

Smatch seems to be returning mostly false positives,
but not this time.
parent 02aae77c
......@@ -881,6 +881,8 @@ static int unlink1 (struct usbtest_dev *dev, int pipe, int size, int async)
init_completion (&completion);
urb = simple_alloc_urb (testdev_to_usbdev (dev), pipe, size);
if (!urb)
return -ENOMEM;
if (async)
urb->transfer_flags |= URB_ASYNC_UNLINK;
urb->context = &completion;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment