[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1234731354-7472-1-git-send-email-jirislaby@gmail.com>
Date: Sun, 15 Feb 2009 21:55:54 +0100
From: Jiri Slaby <jirislaby@...il.com>
To: lenb@...nel.org
Cc: linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
Jiri Slaby <jirislaby@...il.com>
Subject: [PATCH 1/1] ACPI: bus.c, fix error handling in acpi_bus_init
There was a misplaced status test. Move it to correct place and
rollback appropriately.
Signed-off-by: Jiri Slaby <jirislaby@...il.com>
---
drivers/acpi/bus.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 765fd1c..79efef6 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -760,18 +760,17 @@ static int __init acpi_bus_init(void)
status = acpi_os_initialize1();
-
- status =
- acpi_enable_subsystem(ACPI_NO_HARDWARE_INIT | ACPI_NO_ACPI_ENABLE);
if (ACPI_FAILURE(status)) {
printk(KERN_ERR PREFIX
- "Unable to start the ACPI Interpreter\n");
- goto error1;
+ "Unable to initialize ACPI OS objects\n");
+ goto error0;
}
+ status =
+ acpi_enable_subsystem(ACPI_NO_HARDWARE_INIT | ACPI_NO_ACPI_ENABLE);
if (ACPI_FAILURE(status)) {
printk(KERN_ERR PREFIX
- "Unable to initialize ACPI OS objects\n");
+ "Unable to start the ACPI Interpreter\n");
goto error1;
}
@@ -832,6 +831,7 @@ static int __init acpi_bus_init(void)
/* Mimic structured exception handling */
error1:
acpi_terminate();
+error0:
return -ENODEV;
}
--
1.6.1.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists