Files
linux/drivers/gpu/drm/radeon
Xiongfeng Wang 725a521a18 drm/radeon: Fix PCI device refcount leak in radeon_atrm_get_bios()
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 radeon_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: d8ade3526b ("drm/radeon: handle non-VGA class pci devices with ATRM")
Fixes: c61e277587 ("drm/radeon: split ATRM support out from the ATPX handler (v3)")
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2022-11-29 11:03:38 -05:00
..
2022-04-25 11:17:45 +02:00
2019-12-18 16:09:13 -05:00
2019-06-10 22:30:24 +02:00
2022-01-18 17:43:36 -05:00
2019-06-10 22:30:24 +02:00
2022-08-23 16:53:43 -04:00
2022-01-18 17:43:36 -05:00
2022-01-18 17:43:36 -05:00
2022-07-25 09:31:02 -04:00
2019-06-10 22:30:24 +02:00
2022-01-18 17:43:36 -05:00
2020-09-22 17:37:38 -04:00
2020-09-22 17:37:38 -04:00
2020-09-22 17:37:38 -04:00