Skip to content

Commit

Permalink
[PATCH] i386: Fix bogus return value in hpet_next_event()
Browse files Browse the repository at this point in the history
The clockevents / tick management code expects an error value, when the
event is already expired. hpet_next_event() returns 1 in that case.

Fix it to return the proper -ETIME error code.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Thomas Gleixner authored and Linus Torvalds committed Mar 27, 2007
1 parent e0ab0bb commit c7f6d15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/i386/kernel/hpet.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ static int hpet_next_event(unsigned long delta,
cnt += delta;
hpet_writel(cnt, HPET_T0_CMP);

return ((long)(hpet_readl(HPET_COUNTER) - cnt ) > 0);
return ((long)(hpet_readl(HPET_COUNTER) - cnt ) > 0) ? -ETIME : 0;
}

/*
Expand Down

0 comments on commit c7f6d15

Please sign in to comment.