Skip to content

Commit 5edab14

Browse files
oneukumgregkh
authored andcommitted
Input: ff-memless - kill timer in destroy()
commit fa3a5a1 upstream. 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]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent a7a3b07 commit 5edab14

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
@@ -501,6 +501,15 @@ static void ml_ff_destroy(struct ff_device *ff)
501501
{
502502
struct ml_device *ml = ff->private;
503503

504+
/*
505+
* Even though we stop all playing effects when tearing down
506+
* an input device (via input_device_flush() that calls into
507+
* input_ff_flush() that stops and erases all effects), we
508+
* do not actually stop the timer, and therefore we should
509+
* do it here.
510+
*/
511+
del_timer_sync(&ml->timer);
512+
504513
kfree(ml->private);
505514
}
506515

0 commit comments

Comments
 (0)