Merge tag 'gvt-fixes-2017-08-23' of https://github.com/01org/gvt-linux into drm-intel...
[sfrench/cifs-2.6.git] / drivers / rtc / rtc-nuc900.c
index b1b6b3041bfbc94eac0a478daabd7549bc891163..4ed81117cf5f346d663d11f0a799df4bd3801926 100644 (file)
@@ -93,7 +93,7 @@ static int *check_rtc_access_enable(struct nuc900_rtc *nuc900_rtc)
        __raw_writel(AERPOWERON, nuc900_rtc->rtc_reg + REG_RTC_AER);
 
        while (!(__raw_readl(nuc900_rtc->rtc_reg + REG_RTC_AER) & AERRWENB)
-                                                               && timeout--)
+                                                               && --timeout)
                mdelay(1);
 
        if (!timeout)