Skip to content

Commit 0d6434e

Browse files
anirudhrbgregkh
authored andcommitted
firmware_loader: use -ETIMEDOUT instead of -EAGAIN in fw_load_sysfs_fallback
The only motivation for using -EAGAIN in commit 0542ad8 ("firmware loader: Fix _request_firmware_load() return val for fw load abort") was to distinguish the error from -ENOMEM, and so there is no real reason in keeping it. -EAGAIN is typically used to tell the userspace to try something again and in this case re-using the sysfs loading interface cannot be retried when a timeout happens, so the return value is also bogus. -ETIMEDOUT is received when the wait times out and returning that is much more telling of what the reason for the failure was. So, just propagate that instead of returning -EAGAIN. Suggested-by: Luis Chamberlain <[email protected]> Reviewed-by: Shuah Khan <[email protected]> Acked-by: Luis Chamberlain <[email protected]> Signed-off-by: Anirudh Rayabharam <[email protected]> Cc: stable <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 4d1014c commit 0d6434e

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/base/firmware_loader/fallback.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,6 @@ static int fw_load_sysfs_fallback(struct fw_sysfs *fw_sysfs, long timeout)
535535
if (fw_state_is_aborted(fw_priv)) {
536536
if (retval == -ERESTARTSYS)
537537
retval = -EINTR;
538-
else
539-
retval = -EAGAIN;
540538
} else if (fw_priv->is_paged_buf && !fw_priv->data)
541539
retval = -ENOMEM;
542540

0 commit comments

Comments
 (0)