From patchwork Sun Feb 15 20:55:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 7369 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n1FKsN6a030240 for ; Sun, 15 Feb 2009 20:56:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753173AbZBOU4H (ORCPT ); Sun, 15 Feb 2009 15:56:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752845AbZBOU4H (ORCPT ); Sun, 15 Feb 2009 15:56:07 -0500 Received: from smtp.wellnetcz.com ([212.24.148.102]:56663 "EHLO smtp.wellnetcz.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752738AbZBOU4G (ORCPT ); Sun, 15 Feb 2009 15:56:06 -0500 Received: from localhost.localdomain ([88.208.94.142]) by smtp.wellnetcz.com (8.14.1/8.14.1) with ESMTP id n1FLHnqq010458; Sun, 15 Feb 2009 22:17:50 +0100 From: Jiri Slaby To: lenb@kernel.org Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby Subject: [PATCH 1/1] ACPI: bus.c, fix error handling in acpi_bus_init Date: Sun, 15 Feb 2009 21:55:54 +0100 Message-Id: <1234731354-7472-1-git-send-email-jirislaby@gmail.com> X-Mailer: git-send-email 1.6.1.3 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org There was a misplaced status test. Move it to correct place and rollback appropriately. Signed-off-by: Jiri Slaby --- 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; }