Skip to content

Commit

Permalink
acpi_video: fix leaking PCI references
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Cox authored and Len Brown committed Jun 1, 2012
1 parent 76e10d1 commit cfb46f4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/acpi/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand Down

0 comments on commit cfb46f4

Please sign in to comment.