aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorMing Lei <ming.lei@canonical.com>2012-08-20 07:04:15 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-06 17:46:16 -0400
commitef40bb1bd01738670bd567e3dce8e862f2b91bf3 (patch)
tree076f18d361a06d3c303821b46823d3aed3b5744d /drivers/base
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')
-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 ed0510a912c8..edc88bc68b3d 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,
718 mutex_lock(&fw_lock); 718 mutex_lock(&fw_lock);
719 if (test_bit(FW_STATUS_ABORT, &buf->status)) { 719 if (test_bit(FW_STATUS_ABORT, &buf->status)) {
720 fw_priv = ERR_PTR(-ENOENT); 720 fw_priv = ERR_PTR(-ENOENT);
721 firmware->priv = buf;
721 _request_firmware_cleanup(firmware_p); 722 _request_firmware_cleanup(firmware_p);
722 goto exit; 723 goto exit;
723 } else if (test_bit(FW_STATUS_DONE, &buf->status)) { 724 } else if (test_bit(FW_STATUS_DONE, &buf->status)) {