diff mbox

[1/2] ACPI: Add NULL pointer check in acpi_bus_start

Message ID 201001291748.51320.trenn@suse.de (mailing list archive)
State New, archived
Headers show

Commit Message

Thomas Renninger Jan. 29, 2010, 4:48 p.m. UTC
None
diff mbox

Patch

Index: linux-2.6.32-SLE11-SP1/drivers/acpi/scan.c
===================================================================
--- linux-2.6.32-SLE11-SP1.orig/drivers/acpi/scan.c
+++ linux-2.6.32-SLE11-SP1/drivers/acpi/scan.c
@@ -1382,6 +1382,9 @@  int acpi_bus_start(struct acpi_device *d
 {
 	struct acpi_bus_ops ops;
 
+	if (!device)
+		return -EINVAL;
+
 	memset(&ops, 0, sizeof(ops));
 	ops.acpi_op_start = 1;