Skip to content

Commit

Permalink
staging: greybus: es2: fix arpc request size
Browse files Browse the repository at this point in the history
Fix size field of arpc message request by using the header size and not
the pointer size.

Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Rui Miguel Silva authored and Greg Kroah-Hartman committed Oct 24, 2016
1 parent f9a21a3 commit 7fec2bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/greybus/es2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ static struct arpc *arpc_alloc(void *payload, u16 size, u8 type)
goto err_free_req;

rpc->req->type = type;
rpc->req->size = cpu_to_le16(sizeof(rpc->req) + size);
rpc->req->size = cpu_to_le16(sizeof(*rpc->req) + size);
memcpy(rpc->req->data, payload, size);

init_completion(&rpc->response_received);
Expand Down

0 comments on commit 7fec2bc

Please sign in to comment.