On Fri, 2013-11-15 at 23:26 +0100, Hans de Goede wrote: > Hi, > > On 11/15/2013 11:16 PM, Oliver Neukum wrote: > > On Fri, 2013-11-15 at 16:06 +0100, Hans de Goede wrote: > >> This is a preparation patch for adding support for bulk streams to usbfs. > > > >> @@ -2086,19 +2097,30 @@ int usb_free_streams(struct usb_interface *interface, > >> { > >> struct usb_hcd *hcd; > >> struct usb_device *dev; > >> - int i; > >> + int i, ret; > >> > >> dev = interface_to_usbdev(interface); > >> hcd = bus_to_hcd(dev->bus); > >> if (dev->speed != USB_SPEED_SUPER) > >> return -EINVAL; > >> > >> - /* Streams only apply to bulk endpoints. */ > >> - for (i = 0; i < num_eps; i++) > >> - if (!eps[i] || !usb_endpoint_xfer_bulk(&eps[i]->desc)) > > > > Why bother checking for the endpoint's type? > > Not sure what you're trying to say here, the check gets re-added a couple of lines > later in the patch. Are you trying to say the ep type check can be removed entirely? Yes, the check makes sense on allocation only. Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html