aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@canonical.com>2009-04-04 04:33:34 -0400
committerLen Brown <len.brown@intel.com>2009-04-04 12:36:21 -0400
commit350e32907cf72ef82bbe7d72525fa2d9dcf64682 (patch)
tree160e78f3e687809cb2062ef1228cedccde0aef52
parenta74dd5fdabcd34c93e17e9c7024eeb503c92b048 (diff)
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.c8
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)
1136 } 1136 }
1137 1137
1138 err = acer_rfkill_init(&device->dev); 1138 err = acer_rfkill_init(&device->dev);
1139 if (err)
1140 goto error_rfkill;
1139 1141
1140 return err; 1142 return err;
1141 1143
1144error_rfkill:
1145 if (has_cap(ACER_CAP_BRIGHTNESS))
1146 acer_backlight_exit();
1142error_brightness: 1147error_brightness:
1143 acer_led_exit(); 1148 if (has_cap(ACER_CAP_MAILLED))
1149 acer_led_exit();
1144error_mailled: 1150error_mailled:
1145 return err; 1151 return err;
1146} 1152}