Commit:     96b5a46e2a72dc1829370c87053e0cd558d58bc0
Parent:     2c1582699872d38682b136b1446953ee351bc7e1
Author:     Linus Torvalds <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 11 20:52:01 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon Feb 11 20:52:01 2008 -0800

    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 <[EMAIL PROTECTED]>
 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 36b84ab..457ed3d 100644
--- a/drivers/acpi/wmi.c
+++ b/drivers/acpi/wmi.c
@@ -673,11 +673,11 @@ static int __init acpi_wmi_init(void)
        acpi_status result;
+       INIT_LIST_HEAD(&wmi_blocks.list);
        if (acpi_disabled)
                return -ENODEV;
-       INIT_LIST_HEAD(&wmi_blocks.list);
        result = acpi_bus_register_driver(&acpi_wmi_driver);
        if (result < 0) {
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to