mirror-linux/drivers/greybus
Haotian Zhang e6df0f649c greybus: gb-beagleplay: Fix timeout handling in bootloader functions
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 <vulab@iscas.ac.cn>
Link: https://patch.msgid.link/20251121064027.571-1-vulab@iscas.ac.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-11-26 14:40:59 +01:00
..
Kconfig greybus: gb-beagleplay: Add firmware upload API 2024-09-12 09:04:09 +02:00
Makefile greybus: Add BeaglePlay Linux Driver 2023-10-27 13:19:04 +02:00
arpc.h greybus: Replace zero-length array with flexible-array 2020-05-13 13:59:13 +02:00
bundle.c greybus: constify the struct device_type usage 2024-03-06 14:13:10 +00:00
connection.c greybus: Use alloc_ordered_workqueue() to create ordered workqueues 2023-05-08 13:52:27 -10:00
control.c greybus: constify the struct device_type usage 2024-03-06 14:13:10 +00:00
core.c Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
debugfs.c
es2.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
gb-beagleplay.c greybus: gb-beagleplay: Fix timeout handling in bootloader functions 2025-11-26 14:40:59 +01:00
greybus_trace.h greybus: remove h from printk format specifier 2021-01-05 15:18:23 +01:00
hd.c greybus: Remove usage of the deprecated ida_simple_xx() API 2024-03-07 21:41:38 +00:00
interface.c greybus: Fix a typo 2024-11-05 05:33:46 +01:00
manifest.c
module.c greybus: constify the struct device_type usage 2024-03-06 14:13:10 +00:00
operation.c greybus: add WQ_PERCPU to alloc_workqueue users 2025-11-26 14:40:53 +01:00
svc.c greybus: svc: use string choice helpers instead of ternary operator 2025-08-19 12:50:31 +02:00
svc_watchdog.c