Commit b1ac8feb authored by Len Brown's avatar Len Brown Committed by Len Brown

[ACPI] Broken fan detection prevents booting (Shaohua David Li)

  http://bugme.osdl.org/show_bug.cgi?id=1185
parent cb24b980
......@@ -337,6 +337,9 @@ acpi_power_transition (
if (!device || (state < ACPI_STATE_D0) || (state > ACPI_STATE_D3))
return_VALUE(-EINVAL);
if ((device->power.state < ACPI_STATE_D0) || (device->power.state > ACPI_STATE_D3))
return_VALUE(-ENODEV);
cl = &device->power.states[device->power.state].resources;
tl = &device->power.states[state].resources;
......@@ -359,8 +362,6 @@ acpi_power_transition (
goto end;
}
device->power.state = state;
/*
* Then we dereference all power resources used in the current list.
*/
......@@ -370,6 +371,8 @@ acpi_power_transition (
goto end;
}
/* We shouldn't change the state till all above operations succeed */
device->power.state = state;
end:
if (result)
ACPI_DEBUG_PRINT((ACPI_DB_WARN,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment