From ef40bb1bd01738670bd567e3dce8e862f2b91bf3 Mon Sep 17 00:00:00 2001 From: Ming Lei Date: Mon, 20 Aug 2012 19:04:15 +0800 Subject: 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 Signed-off-by: Greg Kroah-Hartman --- drivers/base/firmware_class.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/base') 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)) { -- cgit v1.2.3-18-g5258