diff options
author | Andy Whitcroft <apw@canonical.com> | 2009-04-04 10:33:34 +0200 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-04-04 18:36:21 +0200 |
commit | 350e32907cf72ef82bbe7d72525fa2d9dcf64682 (patch) | |
tree | 160e78f3e687809cb2062ef1228cedccde0aef52 | |
parent | acer-wmi: Blacklist Acer Aspire One (diff) | |
download | linux-350e32907cf72ef82bbe7d72525fa2d9dcf64682.tar.xz linux-350e32907cf72ef82bbe7d72525fa2d9dcf64682.zip |
acer-wmi: Cleanup the failure cleanup handling
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>
Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r-- | 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 60fbef283e73..27837e8ae51d 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; } |