Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Roel Kluin and committed by
Linus Torvalds
c318c7ac b4870bc5

+1 -1
+1 -1
drivers/rtc/rtc-au1xxx.c
··· 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) {