On Mon. 23 Sep. 2024 at 13:00, Vincent MAILHOL <mailhol.vincent@xxxxxxxxxx> wrote: (...) > > + if (rc) { > > + dev_err(&intf->dev, "Required endpoints not found\n"); > > + return rc; > > + } > > > > /* send host config */ > > rc = usb_control_msg_send(udev, 0, > > @@ -1466,6 +1478,10 @@ static int gs_usb_probe(struct usb_interface *intf, > > usb_set_intfdata(intf, parent); > > parent->udev = udev; > > Maybe have the usb_find_common_endpoints() next to this? There is no > need to do the endpoint search earlier, so better to group this which > are related together. Actually, if you move the usb_find_common_endpoints() down as I suggested, you would have to add some clean-ups (e.g. kfree(parent)) if the function fails. Probably not worth the effort. Please ignore this last comment. > > + /* store the detected endpoints */ > > + parent->ep_in = ep_in->bEndpointAddress; > > + parent->ep_out = ep_out->bEndpointAddress; > > + > > for (i = 0; i < icount; i++) { > > unsigned int hf_size_rx = 0;