]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
gpio: mpsse: fix reference leak in gpio_mpsse_probe() error paths
authorAbdun Nihaal <nihaal@cse.iitm.ac.in>
Mon, 12 Jan 2026 17:44:41 +0000 (12:44 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Jan 2026 15:35:31 +0000 (16:35 +0100)
commit7ea26e6dcabc270433b6ded2a1aee85b215d1b28
treef95a48d61d74010c3f376f3cfbab9147ee175117
parent7882637ea5ccba08ec3674628f03ff0baf48d935
gpio: mpsse: fix reference leak in gpio_mpsse_probe() error paths

[ Upstream commit 1e876e5a0875e71e34148c9feb2eedd3bf6b2b43 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpio/gpio-mpsse.c