Skip to content

Commit

Permalink
HID: elo: kill not flush the work
Browse files Browse the repository at this point in the history
Flushing a work that reschedules itself is not a sensible operation. It needs
to be killed. Failure to do so leads to a kernel panic in the timer code.

CC: [email protected]
Signed-off-by: Oliver Neukum <[email protected]>
Reviewed-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
  • Loading branch information
oneukum authored and Jiri Kosina committed Jun 1, 2016
1 parent dcc4c2f commit ed596a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hid/hid-elo.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ static void elo_remove(struct hid_device *hdev)
struct elo_priv *priv = hid_get_drvdata(hdev);

hid_hw_stop(hdev);
flush_workqueue(wq);
cancel_delayed_work_sync(&priv->work);
kfree(priv);
}

Expand Down

0 comments on commit ed596a4

Please sign in to comment.