android_kernel_sony_sdm845/drivers/gpu/drm/amd
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Xiongfeng Wang 6611feef35 drm/amdgpu: Fix PCI device refcount leak in amdgpu_atrm_get_bios()
[ Upstream commit ca54639c7752edf1304d92ff4d0c049d4efc9ba0 ]

As comment of pci_get_class() says, it returns a pci_device with its
refcount increased and decreased the refcount for the input parameter
@from if it is not NULL.

If we break the loop in amdgpu_atrm_get_bios() with 'pdev' not NULL, we
need to call pci_dev_put() to decrease the refcount. Add the missing
pci_dev_put() to avoid refcount leak.

Fixes: d38ceaf99e ("drm/amdgpu: add core driver (v4)")
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-07 12:07:18 +01:00
..
acp drm: amd: remove broken include path 2017-12-20 10:07:21 +01:00
amdgpu drm/amdgpu: Fix PCI device refcount leak in amdgpu_atrm_get_bios() 2023-01-07 12:07:18 +01:00
amdkfd drm/amdkfd: Check for potential null return of kmalloc_array() 2022-04-20 09:06:45 +02:00
include drm/amdgpu: fix amdgpu_need_full_reset (v2) 2016-10-14 11:51:04 -04:00
powerplay drm/amd/powerplay/smu7: enforce minimal VBITimeout (v2) 2019-10-05 12:30:28 +02:00
scheduler drm/amd: fix scheduler fence teardown order v2 2016-10-31 12:43:20 -04:00