diff mbox

[2.6.32.stable] ACPI: Add NULL pointer check in acpi_bus_start

Message ID alpine.LFD.2.00.1002182330140.17638@localhost.localdomain (mailing list archive)
State New, archived
Headers show

Commit Message

Len Brown Feb. 19, 2010, 4:35 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index ff9f622..8044583 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1357,6 +1357,9 @@  int acpi_bus_start(struct acpi_device *device)
 {
 	struct acpi_bus_ops ops;
 
+	if (!device)
+		return -EINVAL;
+
 	memset(&ops, 0, sizeof(ops));
 	ops.acpi_op_start = 1;