]> git.ipfire.org Git - thirdparty/linux.git/commit
USB: apple-mfi-fastcharge: drop redundant device reference
authorJohan Hovold <johan@kernel.org>
Thu, 5 Mar 2026 13:38:50 +0000 (14:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2026 14:51:44 +0000 (15:51 +0100)
commit0888c3371ad229ce76675754ce43ae04bb4945e1
treed174b4c167703fda4f7f7d65a2ea699dbe7117de
parentde6c925db978004703944585e9dd57d58aba0fac
USB: apple-mfi-fastcharge: drop redundant device reference

Driver core holds a reference to the USB device while it is bound to a
driver and there is no need to take additional references unless the
structure is 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>
Reviewed-by: Bastien Nocera <hadess@hadess.net>
Link: https://patch.msgid.link/20260305133851.2952-2-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/apple-mfi-fastcharge.c