]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
i2c: tiny-usb: drop redundant device reference
authorJohan Hovold <johan@kernel.org>
Thu, 5 Mar 2026 12:54:03 +0000 (13:54 +0100)
committerWolfram Sang <wsa+renesas@sang-engineering.com>
Mon, 9 Mar 2026 11:59:09 +0000 (12:59 +0100)
commit09472cecf83bc818ba26d3a17b8d7383ad72a1a1
tree582b8d57b5f24a1adfd1fddd1fb442bf4f93c369
parent32dbfb4dbc2a546a6514f1f56152170683778ab4
i2c: tiny-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>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
drivers/i2c/busses/i2c-tiny-usb.c