提交 ef40bb1b 编写于 作者: M Ming Lei 提交者: Greg Kroah-Hartman

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: NMing Lei <ming.lei@canonical.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 43f5e46c
...@@ -718,6 +718,7 @@ _request_firmware_prepare(const struct firmware **firmware_p, const char *name, ...@@ -718,6 +718,7 @@ _request_firmware_prepare(const struct firmware **firmware_p, const char *name,
mutex_lock(&fw_lock); mutex_lock(&fw_lock);
if (test_bit(FW_STATUS_ABORT, &buf->status)) { if (test_bit(FW_STATUS_ABORT, &buf->status)) {
fw_priv = ERR_PTR(-ENOENT); fw_priv = ERR_PTR(-ENOENT);
firmware->priv = buf;
_request_firmware_cleanup(firmware_p); _request_firmware_cleanup(firmware_p);
goto exit; goto exit;
} else if (test_bit(FW_STATUS_DONE, &buf->status)) { } else if (test_bit(FW_STATUS_DONE, &buf->status)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册