OSDN Git Service

greybus: fix a bug in gb_operation_sync()
authorAlex Elder <elder@linaro.org>
Tue, 2 Dec 2014 23:03:51 +0000 (17:03 -0600)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 2 Dec 2014 23:22:22 +0000 (15:22 -0800)
The memcpy of request data into the request payload was
copying the data into the wrong location.  Fix that.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/operation.c

index 1409d31..d3ba658 100644 (file)
@@ -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);