From patchwork Sat Apr 4 08:33:34 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Corbacho X-Patchwork-Id: 16309 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 n348YPKV026298 for ; Sat, 4 Apr 2009 08:34:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759201AbZDDIdn (ORCPT ); Sat, 4 Apr 2009 04:33:43 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759224AbZDDIdn (ORCPT ); Sat, 4 Apr 2009 04:33:43 -0400 Received: from bb-87-81-255-5.ukonline.co.uk ([87.81.255.5]:41929 "EHLO pegasus." rhost-flags-OK-OK-FAIL-FAIL) by vger.kernel.org with ESMTP id S1759201AbZDDIdm (ORCPT ); Sat, 4 Apr 2009 04:33:42 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) by pegasus. (8.14.3/8.13.8) with ESMTP id n348XYQc014362; Sat, 4 Apr 2009 09:33:34 +0100 From: Carlos Corbacho Subject: [PATCH 2/3] acer-wmi: Cleanup the failure cleanup handling To: linux-acpi@vger.kernel.org Cc: lenb@kernel.org Date: Sat, 04 Apr 2009 09:33:34 +0100 Message-ID: <20090404083334.14302.61730.stgit@localhost> In-Reply-To: <20090404083323.14302.40102.stgit@localhost> References: <20090404083323.14302.40102.stgit@localhost> User-Agent: StGIT/0.14.1 MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Andy Whitcroft Cleanup the failure cleanup handling for brightness and email led. [cc: Split out from another patch] Signed-off-by: Andy Whitcroft Signed-off-by: Carlos Corbacho --- drivers/platform/x86/acer-wmi.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index 60fbef2..27837e8 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -1136,11 +1136,17 @@ static int __devinit acer_platform_probe(struct platform_device *device) } err = acer_rfkill_init(&device->dev); + if (err) + goto error_rfkill; return err; +error_rfkill: + if (has_cap(ACER_CAP_BRIGHTNESS)) + acer_backlight_exit(); error_brightness: - acer_led_exit(); + if (has_cap(ACER_CAP_MAILLED)) + acer_led_exit(); error_mailled: return err; }