提交 350e3290 编写于 作者: A Andy Whitcroft 提交者: Len Brown

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: NAndy Whitcroft <apw@canonical.com>
Signed-off-by: NCarlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 a74dd5fd
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册