Skip to content

Commit 91ad120

Browse files
RoelKluintorvalds
authored andcommitted
fbdev: newport: newport_*wait() return 0 on timeout
With a postfix decrement t reaches -1 on timeout which results in a return of 0. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent eb8972b commit 91ad120

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎include/video/newport.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ static __inline__ int newport_wait(struct newport_regs *regs)
453453
{
454454
int t = BUSY_TIMEOUT;
455455

456-
while (t--)
456+
while (--t)
457457
if (!(regs->cset.status & NPORT_STAT_GBUSY))
458458
break;
459459
return !t;
@@ -463,7 +463,7 @@ static __inline__ int newport_bfwait(struct newport_regs *regs)
463463
{
464464
int t = BUSY_TIMEOUT;
465465

466-
while (t--)
466+
while (--t)
467467
if(!(regs->cset.status & NPORT_STAT_BBUSY))
468468
break;
469469
return !t;

0 commit comments

Comments
 (0)