Re: [PATCH v1] ACPI: video: Release PCI device reference after lookup
From: Rafael J. Wysocki (Intel)
Date: Fri Aug 07 2026 - 12:02:08 EST
On Fri, Aug 7, 2026 at 3:57 AM Yuho Choi <dbgh9129@xxxxxxxxx> wrote:
>
> video_detect_portege_r100() uses pci_get_device() only as a boolean
> check for the Trident CyberBlade XP4m32 device. pci_get_device() takes a
> reference on a matching PCI device, but the callback returns without
> releasing it.
>
> Drop the reference after selecting the vendor backlight quirk so the PCI
> device can be released normally.
>
> Fixes: 35a341c9b25d ("ACPI: video: Add acpi_backlight=vendor quirk for Toshiba Portégé R100")
> Assisted-by: OpenAI-Codex:GPT-5
> Signed-off-by: Yuho Choi <dbgh9129@xxxxxxxxx>
> ---
> 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;
> }
>
> --
Applied as 7.3 material, thanks!