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 (
switch (type) {
case ACPI_BUS_TYPE_DEVICE:
result = acpi_bus_get_status(device);
if (!result)
break;
if (!device->status.present)
if (ACPI_FAILURE(result) || !device->status.present) {
result = -ENOENT;
goto end;
}
break;
default:
STRUCT_TO_INT(device->status) = 0x0F;
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