mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 22:52:19 +02:00
platform/chrome: cros_ec_proto: return -EAGAIN when retries timed out
While EC_COMMS_STATUS_PROCESSING flag is still on after it tries EC_COMMAND_RETRIES times for sending EC_CMD_GET_COMMS_STATUS, cros_ec_wait_until_complete() doesn't return an error code. Return -EAGAIN in the case instead. Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> Reviewed-by: Guenter Roeck <groeck@chromium.org> Link: https://lore.kernel.org/r/20220718050914.2267370-9-tzungbi@kernel.org
This commit is contained in:
parent
00eb36d528
commit
7f95d2b68b
|
|
@ -167,6 +167,9 @@ static int cros_ec_wait_until_complete(struct cros_ec_device *ec_dev, uint32_t *
|
|||
return ret;
|
||||
}
|
||||
|
||||
if (i >= EC_COMMAND_RETRIES)
|
||||
ret = -EAGAIN;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user