diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-11 23:52:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-11 23:52:01 -0500 |
commit | 96b5a46e2a72dc1829370c87053e0cd558d58bc0 (patch) | |
tree | 1f327e4ee26377d40c5fcac8cda3f2fab03f6f09 | |
parent | 2c1582699872d38682b136b1446953ee351bc7e1 (diff) |
WMI: initialize wmi_blocks.list even if ACPI is disabled
Even if we don't want to register the WMI driver, we should initialize
the wmi_blocks list to be empty, since we don't want the wmi helper
functions to oops just because that basic list has not even been set up.
With this, "find_guid()" will happily return "not found" rather than
oopsing all over the place, and the callers will then just automatically
return false or AE_NOT_FOUND as appropriate.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/acpi/wmi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/wmi.c b/drivers/acpi/wmi.c index 36b84ab418dd..457ed3d3f51c 100644 --- a/drivers/acpi/wmi.c +++ b/drivers/acpi/wmi.c | |||
@@ -673,11 +673,11 @@ static int __init acpi_wmi_init(void) | |||
673 | { | 673 | { |
674 | acpi_status result; | 674 | acpi_status result; |
675 | 675 | ||
676 | INIT_LIST_HEAD(&wmi_blocks.list); | ||
677 | |||
676 | if (acpi_disabled) | 678 | if (acpi_disabled) |
677 | return -ENODEV; | 679 | return -ENODEV; |
678 | 680 | ||
679 | INIT_LIST_HEAD(&wmi_blocks.list); | ||
680 | |||
681 | result = acpi_bus_register_driver(&acpi_wmi_driver); | 681 | result = acpi_bus_register_driver(&acpi_wmi_driver); |
682 | 682 | ||
683 | if (result < 0) { | 683 | if (result < 0) { |