linux/drivers/staging
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
..
axis-fifo Staging driver fixes for 6.18-rc1 2025-10-07 11:41:06 -07:00
fbtft staging: fbtft: cleanup error handling in fbtft_framebuffer_alloc() 2025-07-09 13:11:07 +02:00
gpib staging: gpib: Fix device reference leak in fmh_gpib driver 2025-10-13 10:55:03 +02:00
greybus treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
iio staging: iio: adc: ad7816: Drop unnecessary dev_set_drvdata() call 2025-08-25 09:24:19 +01:00
media media: staging/ipu7: fix isys device runtime PM usage in firmware closing 2025-09-10 10:40:53 +02:00
most media: Reset file->private_data to NULL in v4l2_fh_del() 2025-08-13 08:33:44 +02:00
nvec staging: nvec: Fix incorrect null termination of battery manufacturer 2025-07-24 11:29:57 +02:00
octeon Staging driver changes for 6.18-rc1 2025-10-04 16:17:14 -07:00
rtl8723bs Staging driver changes for 6.18-rc1 2025-10-04 16:17:14 -07:00
sm750fb staging: sm750fb: rename camel case variable 2025-09-14 17:08:39 +02:00
vc04_services staging: vc04_services/vchiq-mmal: fix typos in comments 2025-08-13 16:25:15 +02:00
vme_user staging: vme_user: fix spelling errors 2025-07-24 11:28:26 +02:00
Kconfig staging: fieldbus: Delete unused driver 2024-11-04 00:53:07 +01:00
Makefile staging: fieldbus: Delete unused driver 2024-11-04 00:53:07 +01:00