firmware_class: Don't fail request_firmware if we're not using a buffer

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>
This commit is contained in:
Vikram Mulukutla 2015-05-14 13:58:06 -07:00 committed by David Keitel
parent 3e47c53624
commit 08c8dcb464

View 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);