Discovered while trying to use the second interface in the USB keyboard
driver necessary on Apple USB keyboards.
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Signed-off-by: Janne Grunau <j@jannau.net>
reset_ep(udev, ep_index);
ring = virt_dev->eps[ep_index].ring;
+ if (!ring)
+ return -EINVAL;
+
/*
* How much data is (potentially) left before the 64KB boundary?
* XHCI Spec puts restriction( TABLE 49 and 6.4.1 section of XHCI Spec)
ep_index = usb_pipe_ep_index(pipe);
ep_ring = virt_dev->eps[ep_index].ring;
+ if (!ep_ring)
+ return -EINVAL;
/*
* Check to see if the max packet size for the default control