Commit ae797dcd authored by Alan Cox's avatar Alan Cox Committed by Greg Kroah-Hartman

acpi_video: fix leaking PCI references

commit cfb46f43 upstream.
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Acked-by: default avatarMatthew Garrett <mjg@redhat.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 18f63bf6
...@@ -1732,6 +1732,7 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type) ...@@ -1732,6 +1732,7 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type)
static int __init intel_opregion_present(void) static int __init intel_opregion_present(void)
{ {
int i915 = 0;
#if defined(CONFIG_DRM_I915) || defined(CONFIG_DRM_I915_MODULE) #if defined(CONFIG_DRM_I915) || defined(CONFIG_DRM_I915_MODULE)
struct pci_dev *dev = NULL; struct pci_dev *dev = NULL;
u32 address; u32 address;
...@@ -1744,10 +1745,10 @@ static int __init intel_opregion_present(void) ...@@ -1744,10 +1745,10 @@ static int __init intel_opregion_present(void)
pci_read_config_dword(dev, 0xfc, &address); pci_read_config_dword(dev, 0xfc, &address);
if (!address) if (!address)
continue; continue;
return 1; i915 = 1;
} }
#endif #endif
return 0; return i915;
} }
int acpi_video_register(void) int acpi_video_register(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment