lkml.org 
[lkml]   [2012]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/3] firmware loader: fix firmware -ENOENT situations
Date
If the requested firmware image doesn't exist, firmware->priv
should be set for the later concurrent requests, otherwise
warning and oops will be triggered inside firmware_free_data().

Signed-off-by: Ming Lei <ming.lei@canonical.com>
---
drivers/base/firmware_class.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index ed0510a..edc88bc 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -718,6 +718,7 @@ _request_firmware_prepare(const struct firmware **firmware_p, const char *name,
mutex_lock(&fw_lock);
if (test_bit(FW_STATUS_ABORT, &buf->status)) {
fw_priv = ERR_PTR(-ENOENT);
+ firmware->priv = buf;
_request_firmware_cleanup(firmware_p);
goto exit;
} else if (test_bit(FW_STATUS_DONE, &buf->status)) {
--
1.7.9.5


\
 
 \ /
  Last update: 2012-08-20 13:41    [W:0.050 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site