linux/drivers/staging/gpib
Ma Ke b1aabb8ef0 staging: gpib: Fix device reference leak in fmh_gpib driver
The fmh_gpib driver contains a device reference count leak in
fmh_gpib_attach_impl() where driver_find_device() increases the
reference count of the device by get_device() when matching but this
reference is not properly decreased. Add put_device() in
fmh_gpib_detach(), which ensures that the reference count of the
device is correctly managed.

Found by code review.

Cc: stable <stable@kernel.org>
Fixes: 8e4841a088 ("staging: gpib: Add Frank Mori Hess FPGA PCI GPIB driver")
Signed-off-by: Ma Ke <make24@iscas.ac.cn>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-10-13 10:55:03 +02:00
..
agilent_82350b staging: gpib: Fix no EOI on 1 and 2 byte writes 2025-10-13 10:53:52 +02:00
agilent_82357a staging: gpib: tidy-up comments 2025-08-19 12:58:19 +02:00
cb7210 staging: gpib: tidy-up comments 2025-08-19 12:58:19 +02:00
cec staging: gpib: tidy-up comments 2025-08-19 12:58:19 +02:00
common staging: gpib: tidy-up comments 2025-08-19 12:58:19 +02:00
eastwood staging: gpib: tidy-up comments 2025-08-19 12:58:19 +02:00
fmh_gpib staging: gpib: Fix device reference leak in fmh_gpib driver 2025-10-13 10:55:03 +02:00
gpio staging: gpib: use int type to store negative error codes 2025-09-06 15:55:35 +02:00
hp_82335 staging: gpib: Add return value to request_control 2025-04-18 16:49:00 +02:00
hp_82341 staging: gpib: tidy-up comments 2025-08-19 12:58:19 +02:00
include staging: gpib: tidy-up comments 2025-08-19 12:58:19 +02:00
ines staging: gpib: tidy-up comments 2025-08-19 12:58:19 +02:00
lpvo_usb_gpib staging: gpib: lpvo_usb_gpib: Remove unreachable return statement 2025-07-09 13:11:35 +02:00
nec7210 staging: gpib: tidy-up comments 2025-08-19 12:58:19 +02:00
ni_usb staging: gpib: Return -EINTR on device clear 2025-10-13 10:54:44 +02:00
pc2 staging: gpib: tidy-up comments 2025-08-19 12:58:19 +02:00
tms9914 staging: gpib: tidy-up comments 2025-08-19 12:58:19 +02:00
tnt4882 staging: gpib: tnt4882: Remove redundant header files 2025-09-06 15:54:23 +02:00
uapi staging: gpib: Add bit and byte padding to ioctl structs 2025-06-19 17:32:32 +02:00
Kconfig staging: gpib: Remove dependencies on !X86_PAE 2025-02-19 16:47:25 +01:00
Makefile staging: gpib: Replace custom debug with dev_dbg 2024-11-07 09:27:34 +01:00
TODO staging: gpib: Update TODO 2025-06-19 17:31:52 +02:00