提交 cfb46f43 编写于 作者: A Alan Cox 提交者: Len Brown

acpi_video: fix leaking PCI references

Signed-off-by: NAlan Cox <alan@linux.intel.com>
Acked-by: NMatthew Garrett <mjg@redhat.com>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 76e10d15
......@@ -1745,6 +1745,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;
......@@ -1757,10 +1758,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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册