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

[ACPI] acpi_bus_add() ignored _STA's return value

  from Bjorn Helgaas
parent 28abb66f
...@@ -706,11 +706,11 @@ acpi_bus_add ( ...@@ -706,11 +706,11 @@ acpi_bus_add (
switch (type) { switch (type) {
case ACPI_BUS_TYPE_DEVICE: case ACPI_BUS_TYPE_DEVICE:
result = acpi_bus_get_status(device); result = acpi_bus_get_status(device);
if (!result) if (ACPI_FAILURE(result) || !device->status.present) {
break;
if (!device->status.present)
result = -ENOENT; result = -ENOENT;
goto end; goto end;
}
break;
default: default:
STRUCT_TO_INT(device->status) = 0x0F; STRUCT_TO_INT(device->status) = 0x0F;
break; break;
......
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