]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gpib: ni_usb: drop redundant device reference
authorJohan Hovold <johan@kernel.org>
Thu, 5 Mar 2026 10:27:45 +0000 (11:27 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Mar 2026 10:48:54 +0000 (11:48 +0100)
commit678f946b40586a276421b2b4b6201665d6709119
tree695a44d1482471741222152abf11493add77c1a2
parentd35da40ec364ff9e763e7fd3198ca14cf39d39bf
gpib: ni_usb: drop redundant device reference

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>
Link: https://patch.msgid.link/20260305102745.12032-3-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpib/ni_usb/ni_usb_gpib.c