]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: rtlwifi: usb: drop redundant device reference
authorJohan Hovold <johan@kernel.org>
Mon, 9 Mar 2026 08:33:36 +0000 (09:33 +0100)
committerPing-Ke Shih <pkshih@realtek.com>
Mon, 16 Mar 2026 06:06:11 +0000 (14:06 +0800)
commitfc25b384fc0bb983fe383e8392b6c2f4aafec77d
tree1528618842dc95e7bb6f8f54212b506d66582d88
parentc2a21f35cea43c3287a4f314b7aab22ea7234122
wifi: rtlwifi: 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: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260309083336.16397-1-johan@kernel.org
drivers/net/wireless/realtek/rtlwifi/usb.c