diff mbox

[11/38] tick-common: fix wrong check in tick_check_replacement()

Message ID 1f59048520216e11bcaa50720c005d471372e48f.1397492345.git.viresh.kumar@linaro.org
State New
Headers show

Commit Message

Viresh Kumar April 14, 2014, 4:23 p.m. UTC
tick_check_replacement() returns if a replacement of clock_event_device is
possible or not. It does this as the first check:

	if (tick_check_percpu(curdev, newdev, smp_processor_id()))
		return false;

This looks wrong as we are returning false when tick_check_percpu() cpu returned
true. Probably Thomas forgot '!' here in his commit: 03e13cf5e ?

Fix it by placing a '!' before tick_check_percpu().

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 kernel/time/tick-common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c
index 395cbbd..8650026 100644
--- a/kernel/time/tick-common.c
+++ b/kernel/time/tick-common.c
@@ -257,7 +257,7 @@  static bool tick_check_preferred(struct clock_event_device *curdev,
 bool tick_check_replacement(struct clock_event_device *curdev,
 			    struct clock_event_device *newdev)
 {
-	if (tick_check_percpu(curdev, newdev, smp_processor_id()))
+	if (!tick_check_percpu(curdev, newdev, smp_processor_id()))
 		return false;
 
 	return tick_check_preferred(curdev, newdev);