Commit b1aabb8e authored by Ma Ke's avatar Ma Ke Committed by Greg Kroah-Hartman
Browse files

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: 8e4841a0 ("staging: gpib: Add Frank Mori Hess FPGA PCI GPIB driver")
Signed-off-by: default avatarMa Ke <make24@iscas.ac.cn>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent aaf2af1e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment