virt/lx_emul: check for NULL urb in usb_submit_urb()

The Linux implementation also includes this check. NULL urb submission
happened with Wacom touch devices.
This commit is contained in:
Christian Helmuth 2024-01-19 16:29:09 +01:00
parent 2584c104e0
commit e440ab40ef

View File

@ -92,6 +92,9 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
int ret = 0; int ret = 0;
unsigned timeout_jiffies = msecs_to_jiffies(10000u); unsigned timeout_jiffies = msecs_to_jiffies(10000u);
if (!urb || !urb->complete)
return -EINVAL;
if (!urb->dev->bus) if (!urb->dev->bus)
return -ENODEV; return -ENODEV;