aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus
diff options
context:
space:
mode:
authorRui Miguel Silva <rmfrfs@gmail.com>2016-10-19 13:44:25 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-10-24 15:48:02 +0200
commit7fec2bc90a4ca0bbdedf6724cb539dad23e99070 (patch)
treea52217d750c0eee6a40ec890144e7d02f7f09163 /drivers/staging/greybus
parentstaging: greybus: audio_manager_sysfs: Replace sscanf with kstrto* to single variable conversion. (diff)
downloadlinux-dev-7fec2bc90a4ca0bbdedf6724cb539dad23e99070.tar.xz
linux-dev-7fec2bc90a4ca0bbdedf6724cb539dad23e99070.zip
staging: greybus: es2: fix arpc request size
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>
Diffstat (limited to 'drivers/staging/greybus')
-rw-r--r--drivers/staging/greybus/es2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/greybus/es2.c b/drivers/staging/greybus/es2.c
index 8eabc713a26d..d7fd4a05f113 100644
--- a/drivers/staging/greybus/es2.c
+++ b/drivers/staging/greybus/es2.c
@@ -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);