[PATCH 06/20] ACPI: video: Fix PCI device reference leak in video_detect_portege_r100()
From: Wentao Liang
Date: Wed Sep 16 2026 - 03:18:48 EST
In video_detect_portege_r100(), pci_get_device() is used to check for
the presence of the Trident CyberBlade XP4m32 PCI device, which returns
a device pointer with its reference counter incremented. However, the
acquired reference is never released, resulting in a reference count leak.
Add pci_dev_put() to properly drop the reference when the device is found.
Fixes: 35a341c9b25d ("ACPI: video: Add acpi_backlight=vendor quirk for Toshiba Portégé R100")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>
---
drivers/acpi/video_detect.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index 458efa4fe9d4..4c1c3b0b5499 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -137,8 +137,10 @@ static int video_detect_portege_r100(const struct dmi_system_id *d)
struct pci_dev *dev;
/* Search for Trident CyberBlade XP4m32 to confirm Portégé R100 */
dev = pci_get_device(PCI_VENDOR_ID_TRIDENT, 0x2100, NULL);
- if (dev)
+ if (dev) {
acpi_backlight_dmi = acpi_backlight_vendor;
+ pci_dev_put(dev);
+ }
return 0;
}
--
2.34.1