Skip to content

Commit

Permalink
firmware loader: Fix _request_firmware_load() return val for fw load …
Browse files Browse the repository at this point in the history
…abort

_request_firmware_load() returns -ENOMEM when fw load is aborted after
timeout. Call is_fw_load_aborted() to check if fw load is aborted and
if true return -EAGAIN.

Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Shuah Khan authored and Greg Kroah-Hartman committed Jul 24, 2014
1 parent d216814 commit 0542ad8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/base/firmware_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,9 @@ static int _request_firmware_load(struct firmware_priv *fw_priv,
wait_for_completion(&buf->completion);

cancel_delayed_work_sync(&fw_priv->timeout_work);
if (!buf->data)
if (is_fw_load_aborted(buf))
retval = -EAGAIN;
else if (!buf->data)
retval = -ENOMEM;

device_remove_file(f_dev, &dev_attr_loading);
Expand Down

0 comments on commit 0542ad8

Please sign in to comment.