浏览代码

[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 <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Thomas Gleixner 18 年之前
父节点
当前提交
c7f6d15ff2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      arch/i386/kernel/hpet.c

+ 1 - 1
arch/i386/kernel/hpet.c

@@ -197,7 +197,7 @@ static int hpet_next_event(unsigned long delta,
 	cnt += delta;
 	cnt += delta;
 	hpet_writel(cnt, HPET_T0_CMP);
 	hpet_writel(cnt, HPET_T0_CMP);
 
 
-	return ((long)(hpet_readl(HPET_COUNTER) - cnt ) > 0);
+	return ((long)(hpet_readl(HPET_COUNTER) - cnt ) > 0) ? -ETIME : 0;
 }
 }
 
 
 /*
 /*