aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2012-04-25 14:33:33 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-17 11:21:28 -0700
commit3e2b0c74fa03b8788f8f7e9bcc778463e53c49a9 (patch)
tree4377850fc80f1afd19b158b24d4d1cabfe6568a3 /drivers/acpi
parent5f68127d9cf4b358060ce5f9906246262a56f179 (diff)
acpi_video: fix leaking PCI references
commit cfb46f433a4da97c31780e08a259fac2cb6bd61f 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>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/video.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 9577b6fa265..66e8f7333e9 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -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)