summaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2017-07-11 13:41:34 +0200
committerDarren Hart (VMware) <dvhart@infradead.org>2017-07-11 18:08:04 +0200
commitc1bda752fdaead0c154c13a72a83faabc7dffc82 (patch)
treece2f10eb79cf4b4651a98bdbcd57921dad37255a /drivers/platform
parentplatform/x86: fujitsu-laptop: add NULL check on devm_kzalloc() return value (diff)
downloadlinux-c1bda752fdaead0c154c13a72a83faabc7dffc82.tar.xz
linux-c1bda752fdaead0c154c13a72a83faabc7dffc82.zip
platform/x86: peaq-wmi: Fix peaq_ignore_events_counter handling off by 1
If peaq_ignore_events_counter gets set to 1 we should skip polling 1 time, rather then ignoring it. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/peaq-wmi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/peaq-wmi.c b/drivers/platform/x86/peaq-wmi.c
index ca75b4dc437e..77d1f90b0794 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 >= 0)
return;
if (obj.integer.value) {