Hi Johan, On 5/23/22 10:56, Johan Hovold wrote: >> + >> + dev = devm_kzalloc(&iface->dev, sizeof(*dev), GFP_KERNEL); >> + if (!dev) >> + return -ENOMEM; >> + >> + dev->usb_dev = usb_get_dev(interface_to_usbdev(iface)); > > No need to grab a reference unless you're going to hold on to it past > disconnect(). I removed that. >> + >> + endpoints = iface->cur_altsetting->endpoint; >> + if (!usb_endpoint_is_bulk_in(&endpoints[0].desc) || >> + !usb_endpoint_is_bulk_out(&endpoints[1].desc) || >> + !usb_endpoint_xfer_int(&endpoints[2].desc)) { >> + rc = -ENODEV; >> + goto free_dev; >> + } > > Please use usb_find_common_endpoints() for the above. Thanks. I wasn't aware on that API. It simplifies things a bit. Regards, Frank.