aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2022-07-25 16:16:56 +0300
committerGitHub <noreply@github.com>2022-07-25 16:16:56 +0300
commit9b1ae87e7be9924083aa6d150c44d8341361002c (patch)
tree7df8e49d058d91377cc97a2e41d41ba7fcb987d2
parent162a1f666c71eb5584ed6dae26b957f9405d33bc (diff)
parent95680ede70a6c4d292f469b630e3c986620fd16a (diff)
downloadhid-tmff2-9b1ae87e7be9924083aa6d150c44d8341361002c.tar.gz
hid-tmff2-9b1ae87e7be9924083aa6d150c44d8341361002c.zip
Merge pull request #44 from gou4shi1/master
Fixed `state->old` may be updated incorrectly.
-rw-r--r--hid-tmff2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hid-tmff2.c b/hid-tmff2.c
index 12e8e25..24b663e 100644
--- a/hid-tmff2.c
+++ b/hid-tmff2.c
@@ -388,7 +388,7 @@ static int tmff2_upload(struct input_dev *dev,
state->effect = *effect;
if (old) {
- if (test_bit(FF_EFFECT_QUEUE_UPDATE, &state->flags))
+ if (!test_bit(FF_EFFECT_QUEUE_UPDATE, &state->flags))
state->old = *old;
__set_bit(FF_EFFECT_QUEUE_UPDATE, &state->flags);