]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gpio: mpsse: fix reference leak in gpio_mpsse_probe() error paths
authorAbdun Nihaal <nihaal@cse.iitm.ac.in>
Fri, 26 Dec 2025 06:04:10 +0000 (11:34 +0530)
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Fri, 2 Jan 2026 09:45:37 +0000 (10:45 +0100)
commit1e876e5a0875e71e34148c9feb2eedd3bf6b2b43
treec887a6b81827656277f4dc5c2425c0afe7d0654f
parent014a17deb41201449f76df2b20c857a9c3294a7c
gpio: mpsse: fix reference leak in gpio_mpsse_probe() error paths

The reference obtained by calling usb_get_dev() is not released in the
gpio_mpsse_probe() error paths. Fix that by using device managed helper
functions. Also remove the usb_put_dev() call in the disconnect function
since now it will be released automatically.

Cc: stable@vger.kernel.org
Fixes: c46a74ff05c0 ("gpio: add support for FTDI's MPSSE as GPIO")
Signed-off-by: Abdun Nihaal <nihaal@cse.iitm.ac.in>
Link: https://lore.kernel.org/r/20251226060414.20785-1-nihaal@cse.iitm.ac.in
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
drivers/gpio/gpio-mpsse.c