Skip to content

Commit

Permalink
Input: synaptics-rmi4 - destroy F54 poller workqueue when removing
Browse files Browse the repository at this point in the history
The driver forgets to destroy workqueue in remove() similarly to what is
done when probe() fails. Add a call to destroy_workqueue() to fix it.

Since unregistration will wait for the work to finish, we do not need to
cancel/flush the work instance in remove().

Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20191114023405.31477-1-hslester96@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Chuhong Yuan authored and Dmitry Torokhov committed Nov 15, 2019
1 parent fa3a5a1 commit ba60cf9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/input/rmi4/rmi_f54.c
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,7 @@ static void rmi_f54_remove(struct rmi_function *fn)

video_unregister_device(&f54->vdev);
v4l2_device_unregister(&f54->v4l2);
destroy_workqueue(f54->workqueue);
}

struct rmi_function_handler rmi_f54_handler = {
Expand Down

0 comments on commit ba60cf9

Please sign in to comment.