Skip to content

Commit

Permalink
fix state->old may be updated incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
gou4shi1 committed Jul 25, 2022
1 parent 162a1f6 commit 95680ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hid-tmff2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 95680ed

Please sign in to comment.