input: i reaches -1
Subsystems (2)
PATCH 1/1 input: i reaches -1
With a postfix decrement i reaches -1 rather than 0, but after the loop it is tested whether it has become 0.
Signed-off-by Roel Kluin <[email protected]>
---
drivers/input/mouse/pxa930_trkball.c +1 -1
@@ -83,7 +83,7 @@ static int write_tbcr(struct pxa930_trkball *trkball, int v)__raw_writel (v, trkball->mmio_base +TBCR ); -while (i--) { +while (--i) {if (__raw_readl (trkball->mmio_base +TBCR ) == v)break ;msleep (1 );
Quoted 4 lines · Roel Kluin
With a postfix decrement i reaches -1 rather than 0, but after the loop it is tested whether it has become 0.
Signed-off-by Roel Kluin <[email protected]>
Applied, thank you Roel.
Signature · 1 line
Dmitry