Skip to content

Commit

Permalink
firmware loader: fix firmware -ENOENT situations
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ming Lei authored and Greg Kroah-Hartman committed Sep 6, 2012
1 parent 43f5e46 commit ef40bb1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/base/firmware_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit ef40bb1

Please sign in to comment.