From: Carlos Corbacho <carlos@strangeworlds.co.uk>
To: linux-acpi@vger.kernel.org
Cc: lenb@kernel.org
Subject: [PATCH 2/3] acer-wmi: Cleanup the failure cleanup handling
Date: Sat, 04 Apr 2009 09:33:34 +0100 [thread overview]
Message-ID: <20090404083334.14302.61730.stgit@localhost> (raw)
In-Reply-To: <20090404083323.14302.40102.stgit@localhost>
From: Andy Whitcroft <apw@canonical.com>
Cleanup the failure cleanup handling for brightness and email led.
[cc: Split out from another patch]
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
---
drivers/platform/x86/acer-wmi.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
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;
}
next prev parent reply other threads:[~2009-04-04 8:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-04 8:33 [PATCH 0/3] acer-wmi patches for 2.6.30 (take 2) Carlos Corbacho
2009-04-04 8:33 ` [PATCH 1/3] acer-wmi: Blacklist Acer Aspire One Carlos Corbacho
2009-04-04 8:33 ` Carlos Corbacho [this message]
2009-04-04 8:33 ` [PATCH 3/3] acer-wmi: Update copyright notice & documentation Carlos Corbacho
2009-04-04 16:43 ` [PATCH 0/3] acer-wmi patches for 2.6.30 (take 2) Len Brown
-- strict thread matches above, loose matches on Subject: below --
2009-04-04 8:12 [PATCH 0/3] acer-wmi patches for 2.6.30 Carlos Corbacho
2009-04-04 8:12 ` [PATCH 2/3] acer-wmi: Cleanup the failure cleanup handling Carlos Corbacho
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=20090404083334.14302.61730.stgit@localhost \
--to=carlos@strangeworlds.co.uk \
--cc=lenb@kernel.org \
--cc=linux-acpi@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.