summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2004-01-23 13:48:11 -0500
committerLen Brown <lenb@dhcppc3.>2004-01-23 13:48:11 -0500
commitd4becc82fb783de0c27a41bf7e6f8ee88159b7a2 (patch)
tree6e6e9239926d1cc7fe9fb3201a111b02662de99d
parent28abb66fba603036a9e2d452f6ffd1e75805d6c5 (diff)
[ACPI] acpi_bus_add() ignored _STA's return value
from Bjorn Helgaas
-rw-r--r--drivers/acpi/scan.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 2477aab0c73a..2166d127a5d5 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -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;