ChangeSet 1.889.379.3, 2003/03/21 12:54:21-08:00, david-b@pacbell.net [PATCH] usbtest catch -ENOMEM Smatch seems to be returning mostly false positives, but not this time. drivers/usb/misc/usbtest.c | 2 ++ 1 files changed, 2 insertions(+) diff -Nru a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c --- a/drivers/usb/misc/usbtest.c Tue Mar 25 16:47:29 2003 +++ b/drivers/usb/misc/usbtest.c Tue Mar 25 16:47:29 2003 @@ -881,6 +881,8 @@ 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;