SH: cpuidle: check error code at init

Registering the driver, or the device, can fail, let's check the return code
and return the error code to the PM layer.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Daniel Lezcano
2013-04-17 13:32:57 +00:00
committed by Rafael J. Wysocki
parent 0a4f841e9c
commit 38a94f4169
3 changed files with 11 additions and 7 deletions

View File

@@ -150,8 +150,7 @@ static const struct platform_suspend_ops sh_pm_ops = {
static int __init sh_pm_init(void)
{
suspend_set_ops(&sh_pm_ops);
sh_mobile_setup_cpuidle();
return 0;
return sh_mobile_setup_cpuidle();
}
late_initcall(sh_pm_init);