OSDN Git Service

firmware_class: Don't fail request_firmware if we're not using a buffer
authorVikram Mulukutla <markivx@codeaurora.org>
Thu, 14 May 2015 20:58:06 +0000 (13:58 -0700)
committerDavid Keitel <dkeitel@codeaurora.org>
Tue, 22 Mar 2016 18:07:40 +0000 (11:07 -0700)
A check that the intermediate firmware actually contains data
is performed before returning from request_firmware. Perform
this check only if we're actually using the intermediate
buffer.

Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
drivers/base/firmware_class.c

index f9f5d6e..0052aff 100644 (file)
@@ -1113,7 +1113,7 @@ static int _request_firmware_load(struct firmware_priv *fw_priv,
 
        if (is_fw_load_aborted(buf))
                retval = -EAGAIN;
-       else if (!buf->data)
+       else if (!buf->data && buf->is_paged_buf)
                retval = -ENOMEM;
 
        device_del(f_dev);