diff options
author | Shuah Khan <shuah.kh@samsung.com> | 2014-07-22 20:10:38 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-23 22:15:20 -0400 |
commit | 0542ad88fbdd81bbd53f48bff981a9867e0f0659 (patch) | |
tree | 986141359687729bc974d53147b9be1abe7bf058 | |
parent | d2168146c222d607bf4baeaaaa990f39411d1567 (diff) |
firmware loader: Fix _request_firmware_load() return val for fw load 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>
-rw-r--r-- | drivers/base/firmware_class.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 124d50ceb116..da77791793f1 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c | |||
@@ -906,7 +906,9 @@ static int _request_firmware_load(struct firmware_priv *fw_priv, | |||
906 | wait_for_completion(&buf->completion); | 906 | wait_for_completion(&buf->completion); |
907 | 907 | ||
908 | cancel_delayed_work_sync(&fw_priv->timeout_work); | 908 | cancel_delayed_work_sync(&fw_priv->timeout_work); |
909 | if (!buf->data) | 909 | if (is_fw_load_aborted(buf)) |
910 | retval = -EAGAIN; | ||
911 | else if (!buf->data) | ||
910 | retval = -ENOMEM; | 912 | retval = -ENOMEM; |
911 | 913 | ||
912 | device_remove_file(f_dev, &dev_attr_loading); | 914 | device_remove_file(f_dev, &dev_attr_loading); |