Re: [PATCH] firmware: set firmware_buf size in fw_get_filesystem_firmware()
From: Bjorn Andersson
Date: Tue Feb 23 2016 - 02:20:26 EST
On Sat, Feb 20, 2016 at 1:22 AM, Sergey Senozhatsky
<sergey.senozhatsky@xxxxxxxxx> wrote:
> Set firmware_buf->size in fw_get_filesystem_firmware() after
> successful kernel_read_file_from_path(), otherwise assign_firmware_buf()
> fails.
>
Acked-by: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
> Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx>
> ---
> drivers/base/firmware_class.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
> index b8bc846..7cf41a5 100644
> --- a/drivers/base/firmware_class.c
> +++ b/drivers/base/firmware_class.c
> @@ -335,6 +335,7 @@ static int fw_get_filesystem_firmware(struct device *device,
> }
> dev_dbg(device, "direct-loading %s\n",
> buf->fw_id);
> + buf->size = size;
> fw_finish_direct_load(device, buf);
> break;
> }
> --
> 2.7.1
>
Regards,
Bjorn