]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
w1: ds2490: drop redundant device reference
authorJohan Hovold <johan@kernel.org>
Fri, 3 Apr 2026 08:44:51 +0000 (10:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Apr 2026 08:55:12 +0000 (10:55 +0200)
commit94e731cbe84533a37701b4089b685d39e584fbea
treec2b4afb3b9a9418c0e0e93477e36d26bc889c74d
parenta1ed2cbb79e67dc0e4b821b78b17fb4e82482ffa
w1: ds2490: 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/20260305111613.18546-1-johan@kernel.org
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://patch.msgid.link/20260403084450.6314-2-krzk@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/w1/masters/ds2490.c