diff options
author | Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> | 2024-12-16 11:25:38 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-01-09 13:33:31 +0100 |
commit | 2da437336625ec80e1666235d5b73b261480c0f7 (patch) | |
tree | d6abc0f0bb3778ef32a3c0604b1f0dadd2fd84b0 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | 77f85ccd3618f324d221f0faaed6d9cdc118c74a (diff) |
platform/x86: mlx-platform: call pci_dev_put() to balance the refcount
[ Upstream commit 185e1b1d91e419445d3fd99c1c0376a970438acf ]
mlxplat_pci_fpga_device_init() calls pci_get_device() but does not
release the refcount on error path. Call pci_dev_put() on the error path
and in mlxplat_pci_fpga_device_exit() to fix this.
This bug was found by an experimental static analysis tool that I am
developing.
Fixes: 02daa222fbdd ("platform: mellanox: Add initial support for PCIe based programming logic device")
Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Reviewed-by: Vadim Pasternak <vadimp@nvidia.com>
Link: https://lore.kernel.org/r/20241216022538.381209-1-joe@pf.is.s.u-tokyo.ac.jp
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
0 files changed, 0 insertions, 0 deletions