Skip to contentSkip to conversation

PNPACPI : don't use device not present

PATCH New matthieu castet 1 participant 1 message Feb 4, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PNPACPI : don't use device not present

Hi,
this patch avoid the pnpacpi layer reconized not present device.

There is still issue [1] with the ACPI code that need to fix in order everything work correctly...

Matthieu CASTET

[1] http://bugzilla.kernel.org/show_bug.cgi?id=3358

drivers/pnp/pnpacpi/core.c +4 -0
@@ -124,6 +124,10 @@
 	struct pnp_dev *dev;
 
 	pnp_dbg("ACPI device : hid %s", acpi_device_hid(device));
+
+	if(!device->status.present)
+		return -ENODEV;
+
 	dev =  pnpacpi_kmalloc(sizeof(struct pnp_dev), GFP_KERNEL);
 	if (!dev) {
 		pnp_err("Out of memory");