Skip to content

Commit fa3a5a1

Browse files
oneukumdtor
authored andcommitted
Input: ff-memless - kill timer in destroy()
No timer must be left running when the device goes away. Signed-off-by: Oliver Neukum <[email protected]> Reported-and-tested-by: [email protected] Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 79aae6a commit fa3a5a1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/input/ff-memless.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,15 @@ static void ml_ff_destroy(struct ff_device *ff)
489489
{
490490
struct ml_device *ml = ff->private;
491491

492+
/*
493+
* Even though we stop all playing effects when tearing down
494+
* an input device (via input_device_flush() that calls into
495+
* input_ff_flush() that stops and erases all effects), we
496+
* do not actually stop the timer, and therefore we should
497+
* do it here.
498+
*/
499+
del_timer_sync(&ml->timer);
500+
492501
kfree(ml->private);
493502
}
494503

0 commit comments

Comments
 (0)