Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cfb46f43 authored by Alan Cox's avatar Alan Cox Committed by Len Brown
Browse files

acpi_video: fix leaking PCI references

parent 76e10d15
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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)