From c7f6d15ff2664467a2cb669abcabb5ffaf719b2d Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 27 Mar 2007 09:08:26 +0200 Subject: [PATCH] [PATCH] i386: Fix bogus return value in hpet_next_event() 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 Signed-off-by: Linus Torvalds --- arch/i386/kernel/hpet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/i386/kernel/hpet.c b/arch/i386/kernel/hpet.c index f3ab61ee74..76afea67f6 100644 --- a/arch/i386/kernel/hpet.c +++ b/arch/i386/kernel/hpet.c @@ -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; } /* -- 2.39.5