ARM: EXYNOS: handle properly the return values
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Sat, 19 Jan 2013 05:57:58 +0000 (21:57 -0800)
committerKukjin Kim <kgene.kim@samsung.com>
Tue, 9 Apr 2013 15:12:26 +0000 (00:12 +0900)
commit5db9f436213d81f053e3f6d69d367637b02fe95e
treee567e034340e9e32ccb24b7c80c6a8edae0bf56b
parent2eb89f893e44b1a9f48fa1cb6aa5e0d18ed66bb5
ARM: EXYNOS: handle properly the return values

The cpuidle_register_driver return value is not checked.
The init function returns always -EIO when cpuidle_register_device
fails but the error could be different.

This patch fixes that by checking the cpuidle_register_driver properly
and returning the correct value when cpuidle_register_device fails.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
arch/arm/mach-exynos/cpuidle.c