From: Bartlomiej Zolnierkiewicz Date: Wed, 18 Mar 2015 13:09:53 +0000 (+0100) Subject: ARM: EXYNOS: fix exynos_boot_secondary() return value on timeout X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9f294c178e03d824a89a85284b04c0770425de76;p=linux-beck.git ARM: EXYNOS: fix exynos_boot_secondary() return value on timeout exynos_boot_secondary() can erroneously return 0 or -ENOSYS even when waiting on pen_release being set to -1 timeouts. Fix it by adjusting ret variable value to -ETIMEDOUT when necessary. Signed-off-by: Bartlomiej Zolnierkiewicz Cc: Daniel Lezcano Signed-off-by: Krzysztof Kozlowski Signed-off-by: Kukjin Kim --- diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index a825bca2a2b6..48f950d0b70e 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c @@ -337,6 +337,9 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle) udelay(10); } + if (pen_release != -1) + ret = -ETIMEDOUT; + /* * now the secondary core is starting up let it run its * calibrations, then wait for it to finish