mirror of
https://github.com/torvalds/linux.git
synced 2026-12-05 04:44:03 +00:00
wait_for_completion_timeout() returns the remaining jiffies
(at least 1) on success or 0 on timeout, but never negative
error codes. The current code incorrectly checks for negative
values, causing timeouts to be ignored and treated as success.
Check for a zero return value to correctly identify and
handle timeout events.
Fixes: 0cf7befa3e ("greybus: gb-beagleplay: Add firmware upload API")
Signed-off-by: Haotian Zhang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>