mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00: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:
parent
5f68127d9c
commit
3e2b0c74fa
1 changed files with 3 additions and 2 deletions
|
@ -1745,6 +1745,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;
|
||||||
|
@ -1757,10 +1758,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)
|
||||||
|
|
Loading…
Reference in a new issue