Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ef40bb1b authored by Ming Lei's avatar Ming Lei Committed by Greg Kroah-Hartman
Browse files

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: default avatarMing Lei <ming.lei@canonical.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 43f5e46c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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)) {