Commit 350e3290 authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Len Brown
Browse files

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: default avatarAndy Whitcroft <apw@canonical.com>
Signed-off-by: default avatarCarlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent a74dd5fd
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -1136,10 +1136,16 @@ 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:
	if (has_cap(ACER_CAP_MAILLED))
		acer_led_exit();
error_mailled:
	return err;