2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00

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>
This commit is contained in:
Andy Whitcroft 2009-04-04 09:33:34 +01:00 committed by Len Brown
parent a74dd5fdab
commit 350e32907c

View File

@ -1136,11 +1136,17 @@ static int __devinit acer_platform_probe(struct platform_device *device)
} }
err = acer_rfkill_init(&device->dev); err = acer_rfkill_init(&device->dev);
if (err)
goto error_rfkill;
return err; return err;
error_rfkill:
if (has_cap(ACER_CAP_BRIGHTNESS))
acer_backlight_exit();
error_brightness: error_brightness:
acer_led_exit(); if (has_cap(ACER_CAP_MAILLED))
acer_led_exit();
error_mailled: error_mailled:
return err; return err;
} }