From: Alex Elder Date: Tue, 2 Dec 2014 23:03:51 +0000 (-0600) Subject: greybus: fix a bug in gb_operation_sync() X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~1789 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6cd6ec55f4940bcddeed65e4eebb6190a64a4eb7;p=karo-tx-linux.git greybus: fix a bug in gb_operation_sync() The memcpy of request data into the request payload was copying the data into the wrong location. Fix that. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/operation.c b/drivers/staging/greybus/operation.c index 1409d31f48c0..d3ba65849f2b 100644 --- a/drivers/staging/greybus/operation.c +++ b/drivers/staging/greybus/operation.c @@ -935,7 +935,7 @@ int gb_operation_sync(struct gb_connection *connection, int type, return -ENOMEM; if (request_size) - memcpy(&operation->request->payload, request, request_size); + memcpy(operation->request->payload, request, request_size); /* Synchronous operation--no callback */ ret = gb_operation_request_send(operation, NULL);