]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gpio: mpsse: drop redundant device reference
authorJohan Hovold <johan@kernel.org>
Thu, 5 Mar 2026 12:49:45 +0000 (13:49 +0100)
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Mon, 9 Mar 2026 09:15:00 +0000 (10:15 +0100)
commit3671411e9073cb06d726dbf10835d158e18f0796
tree9e3b4c4eb42229aaea23a0556b4689de27bd31da
parentb678676b7a0ab65ad5b4278505d6bcf706e53230
gpio: mpsse: 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>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20260305124945.10781-1-johan@kernel.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
drivers/gpio/gpio-mpsse.c