summaryrefslogtreecommitdiffstats
path: root/drivers/base/firmware_class.c
diff options
context:
space:
mode:
authorMing Lei <ming.lei@canonical.com>2012-08-20 19:04:15 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-06 14:46:16 -0700
commitef40bb1bd01738670bd567e3dce8e862f2b91bf3 (patch)
tree076f18d361a06d3c303821b46823d3aed3b5744d /drivers/base/firmware_class.c
parent43f5e46c8e74046a969a3811d7760d1988a8f4bf (diff)
firmware loader: fix firmware -ENOENT situations
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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/firmware_class.c')
-rw-r--r--drivers/base/firmware_class.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index ed0510a912c..edc88bc68b3 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)) {