1
0
Fork 0

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 <dan.carpenter@oracle.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
hifive-unleashed-5.1
Dan Carpenter 2017-07-19 16:07:19 +03:00 committed by Darren Hart (VMware)
parent 972777171f
commit 890f658c10
1 changed files with 1 additions and 1 deletions

View File

@ -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) {