Commit 4310970d authored by Andrej Shadura's avatar Andrej Shadura Committed by Greg Kroah-Hartman
Browse files

HID: u2fzero: properly handle timeouts in usb_submit_urb



[ Upstream commit 43775e62 ]

The wait_for_completion_timeout function returns 0 if timed out or a
positive value if completed. Hence, "less than zero" comparison always
misses timeouts and doesn't kill the URB as it should, leading to
re-sending it while it is active.

Fixes: 42337b9d ("HID: add driver for U2F Zero built-in LED and RNG")
Signed-off-by: default avatarAndrej Shadura <andrew.shadura@collabora.co.uk>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent e2f0bff4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment