From: Andy Whitcroft Date: Sat, 4 Apr 2009 08:33:34 +0000 (+0100) Subject: acer-wmi: Cleanup the failure cleanup handling X-Git-Tag: upstream/snapshot3+hdmi~19462^2~15^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=350e32907cf72ef82bbe7d72525fa2d9dcf64682;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Signed-off-by: Carlos Corbacho Signed-off-by: Len Brown --- 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; }