Skip to content

Commit cc4f952

Browse files
endriftJiri Kosina
authored andcommitted
HID: hid-steam: Make sure rumble work is canceled on removal
When a force feedback command is sent from userspace, work is scheduled to pass this data to the controller without blocking userspace itself. However, in theory, this work might not be properly canceled if the controller is removed at the exact right time. This patch ensures the work is properly canceled when the device is removed. Signed-off-by: Vicki Pfau <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 80818fd commit cc4f952

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/hid/hid-steam.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,6 +1306,7 @@ static void steam_remove(struct hid_device *hdev)
13061306

13071307
cancel_delayed_work_sync(&steam->mode_switch);
13081308
cancel_work_sync(&steam->work_connect);
1309+
cancel_work_sync(&steam->rumble_work);
13091310
hid_destroy_device(steam->client_hdev);
13101311
steam->client_hdev = NULL;
13111312
steam->client_opened = 0;

0 commit comments

Comments
 (0)