OSDN Git Service

platform/x86: peaq-wmi: silence a static checker warning
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 19 Jul 2017 13:07:19 +0000 (16:07 +0300)
committerDarren Hart (VMware) <dvhart@infradead.org>
Tue, 25 Jul 2017 16:56:37 +0000 (09:56 -0700)
commit890f658c101df5842ce8aaec1b0833cf1ba37eb3
treebc3743e6e2e423ff29be4a137d8347768412ccbb
parent972777171f33f9932f51feebe42dbcc1b475d01a
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>
drivers/platform/x86/peaq-wmi.c