mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
acpi_video: fix leaking PCI references
commit cfb46f433a upstream.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Acked-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
18f63bf60d
commit
ae797dcdae
@@ -1732,6 +1732,7 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type)
|
||||
|
||||
static int __init intel_opregion_present(void)
|
||||
{
|
||||
int i915 = 0;
|
||||
#if defined(CONFIG_DRM_I915) || defined(CONFIG_DRM_I915_MODULE)
|
||||
struct pci_dev *dev = NULL;
|
||||
u32 address;
|
||||
@@ -1744,10 +1745,10 @@ static int __init intel_opregion_present(void)
|
||||
pci_read_config_dword(dev, 0xfc, &address);
|
||||
if (!address)
|
||||
continue;
|
||||
return 1;
|
||||
i915 = 1;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
return i915;
|
||||
}
|
||||
|
||||
int acpi_video_register(void)
|
||||
|
||||
Reference in New Issue
Block a user