]> git.hungrycats.org Git - linux/commitdiff
[ACPI] acpi_bus_add() ignored _STA's return value
authorLen Brown <len.brown@intel.com>
Fri, 23 Jan 2004 18:48:11 +0000 (13:48 -0500)
committerLen Brown <lenb@dhcppc3.>
Fri, 23 Jan 2004 18:48:11 +0000 (13:48 -0500)
  from Bjorn Helgaas

drivers/acpi/scan.c

index 2477aab0c73a92e6c9f17622e123afddde2cc995..2166d127a5d59955ea8d7ef09492d6fb92640f31 100644 (file)
@@ -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;
+                       goto end;
+               }
+               break;
        default:
                STRUCT_TO_INT(device->status) = 0x0F;
                break;