[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1406074238-13649-1-git-send-email-shuah.kh@samsung.com>
Date: Tue, 22 Jul 2014 18:10:38 -0600
From: Shuah Khan <shuah.kh@...sung.com>
To: ming.lei@...onical.com, gregkh@...uxfoundation.org
Cc: Shuah Khan <shuah.kh@...sung.com>, linux-kernel@...r.kernel.org
Subject: [PATCH] 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@...sung.com>
---
drivers/base/firmware_class.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index d276e33..3f928b0 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -911,7 +911,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);
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists