On Wed, Mar 11, 2026 at 09:22:26AM +0100, Johan Hovold wrote:
Driver core holds a reference to the USB interface and its parent USB device while the interface is bound to a driver and there is no need to take additional references unless the structures are needed after disconnect.
Drop the redundant device reference to reduce cargo culting, make it easier to spot drivers where an extra reference is needed, and reduce the risk of memory leaks when drivers fail to release it.
Signed-off-by: Johan Hovold johan@kernel.org
This one needs one more spin... Sorry about the mess up.
Changes in v3:
- drop the leftover usb_dev_put() in early error paths
Changes in v2:
- drop temporary udev variable as reported by the kernel test robot (W=1 warning)
Greg, can you pick this one up for 7.1?
Johan