Commit ed596a4a authored by Oliver Neukum's avatar Oliver Neukum Committed by Jiri Kosina

HID: elo: kill not flush the work

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: stable@vger.kernel.org
Signed-off-by: default avatarOliver Neukum <ONeukum@suse.com>
Reviewed-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent dcc4c2f6
...@@ -261,7 +261,7 @@ static void elo_remove(struct hid_device *hdev) ...@@ -261,7 +261,7 @@ static void elo_remove(struct hid_device *hdev)
struct elo_priv *priv = hid_get_drvdata(hdev); struct elo_priv *priv = hid_get_drvdata(hdev);
hid_hw_stop(hdev); hid_hw_stop(hdev);
flush_workqueue(wq); cancel_delayed_work_sync(&priv->work);
kfree(priv); kfree(priv);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment