From: Jiri Slaby <jirislaby@gmail.com>
To: lenb@kernel.org
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
Jiri Slaby <jirislaby@gmail.com>
Subject: [PATCH 1/1] ACPI: bus.c, fix error handling in acpi_bus_init
Date: Sun, 15 Feb 2009 21:55:54 +0100 [thread overview]
Message-ID: <1234731354-7472-1-git-send-email-jirislaby@gmail.com> (raw)
There was a misplaced status test. Move it to correct place and
rollback appropriately.
Signed-off-by: Jiri Slaby <jirislaby@gmail.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
next reply other threads:[~2009-02-15 20:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-15 20:55 Jiri Slaby [this message]
2009-02-21 4:58 ` [PATCH 1/1] ACPI: bus.c, fix error handling in acpi_bus_init Len Brown
2009-02-21 13:05 ` Jiri Slaby
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1234731354-7472-1-git-send-email-jirislaby@gmail.com \
--to=jirislaby@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.