diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-02-11 22:04:34 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-11 23:25:36 +0100 |
commit | c318c7ac49f9139f55da619bbace6137e1509390 (patch) | |
tree | 6fbf4eb351b25d1e2d8dad01568b60f49c514366 /drivers/rtc | |
parent | kernel-doc: fix syscall wrapper processing (diff) | |
download | linux-c318c7ac49f9139f55da619bbace6137e1509390.tar.xz linux-c318c7ac49f9139f55da619bbace6137e1509390.zip |
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>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-au1xxx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-au1xxx.c b/drivers/rtc/rtc-au1xxx.c index 8906a688e6a6..979ed0406ce9 100644 --- a/drivers/rtc/rtc-au1xxx.c +++ b/drivers/rtc/rtc-au1xxx.c @@ -81,7 +81,7 @@ static int __devinit au1xtoy_rtc_probe(struct platform_device *pdev) if (au_readl(SYS_TOYTRIM) != 32767) { /* wait until hardware gives access to TRIM register */ t = 0x00100000; - while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_T0S) && t--) + while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_T0S) && --t) msleep(1); if (!t) { |