Merge tag 'imx6q-cpudile-3.9' of git://git.linaro.org/people/shawnguo/linux-2.6 into...
[firefly-linux-kernel-4.4.55.git] / arch / arm / mach-imx / time.c
index 62769df36db129d7f27508fa6c3d0d10800c42cf..fea91313678b25efb17e7342afb45013c2fa156f 100644 (file)
@@ -152,7 +152,8 @@ static int v2_set_next_event(unsigned long evt,
 
        __raw_writel(tcmp, timer_base + V2_TCMP);
 
-       return (int)(tcmp - __raw_readl(timer_base + V2_TCN)) < 0 ?
+       return evt < 0x7fffffff &&
+               (int)(tcmp - __raw_readl(timer_base + V2_TCN)) < 0 ?
                                -ETIME : 0;
 }