Commit c318c7ac49f9139f55da619bbace6137e1509390
Committed by
Linus Torvalds
1 parent
b4870bc5ee
Exists in
master
and in
7 other branches
rtc: t reaches -1, tested 0
With a postfix decrement t will reach -1 rather than 0, so neither the warning nor the `goto error_out' will occur. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Manuel Lauss <mano@roarinelk.homelinux.net> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
drivers/rtc/rtc-au1xxx.c
... | ... | @@ -81,7 +81,7 @@ |
81 | 81 | if (au_readl(SYS_TOYTRIM) != 32767) { |
82 | 82 | /* wait until hardware gives access to TRIM register */ |
83 | 83 | t = 0x00100000; |
84 | - while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_T0S) && t--) | |
84 | + while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_T0S) && --t) | |
85 | 85 | msleep(1); |
86 | 86 | |
87 | 87 | if (!t) { |