# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1493  -> 1.1494 
#	 drivers/acpi/scan.c	1.20    -> 1.21   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 04/01/23	len.brown@intel.com	1.1494
# [ACPI] acpi_bus_add() ignored _STA's return value
#   from Bjorn Helgaas
# --------------------------------------------
#
diff -Nru a/drivers/acpi/scan.c b/drivers/acpi/scan.c
--- a/drivers/acpi/scan.c	Fri Jan 23 23:48:13 2004
+++ b/drivers/acpi/scan.c	Fri Jan 23 23:48:13 2004
@@ -706,11 +706,11 @@
 	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;