From 890f658c101df5842ce8aaec1b0833cf1ba37eb3 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 19 Jul 2017 16:07:19 +0300 Subject: platform/x86: peaq-wmi: silence a static checker warning There is a harmless static checker warning here that unsigned values are always >= 0. The code looks like: if (peaq_ignore_events_counter && --peaq_ignore_events_counter >= 0) The first part of the condition ensures that we never wrap around so the code works as intended. I've tweaked it slightly to avoid the warning. Signed-off-by: Dan Carpenter Signed-off-by: Andy Shevchenko --- drivers/platform/x86/peaq-wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/peaq-wmi.c b/drivers/platform/x86/peaq-wmi.c index 77d1f90b0794..c68bd76954fd 100644 --- a/drivers/platform/x86/peaq-wmi.c +++ b/drivers/platform/x86/peaq-wmi.c @@ -51,7 +51,7 @@ static void peaq_wmi_poll(struct input_polled_dev *dev) return; } - if (peaq_ignore_events_counter && --peaq_ignore_events_counter >= 0) + if (peaq_ignore_events_counter && peaq_ignore_events_counter--) return; if (obj.integer.value) { -- cgit v1.2.3