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

Commit 354fd4cf authored by Vikram Mulukutla's avatar Vikram Mulukutla Committed by Matt Wagantall
Browse files

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: default avatarVikram Mulukutla <markivx@codeaurora.org>
parent 29121940
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1079,7 +1079,7 @@ static int _request_firmware_load(struct firmware_priv *fw_priv,
	cancel_delayed_work_sync(&fw_priv->timeout_work);
	if (is_fw_load_aborted(buf))
		retval = -EAGAIN;
	else if (!buf->data)
	else if (!buf->data && buf->is_paged_buf)
		retval = -ENOMEM;

	device_remove_file(f_dev, &dev_attr_loading);