From: Alex Elder Date: Wed, 5 Nov 2014 22:03:08 +0000 (-0600) Subject: greybus: fix a bug in gb_operation_gbuf_complete() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=96fd8c2bfdda4b6a2223f235ebdd35e4d391d075;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git greybus: fix a bug in gb_operation_gbuf_complete() The gbuf completion routine was using the request payload pointers (which point at the area *past* the message header) rather than the header. This didn't matter much for now, it was only used in the error path. 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 cc278bcb499d..9cb9c9d590d2 100644 --- a/drivers/staging/greybus/operation.c +++ b/drivers/staging/greybus/operation.c @@ -283,9 +283,9 @@ static void gb_operation_gbuf_complete(struct gbuf *gbuf) int type; if (gbuf == operation->request) - header = operation->request_payload; + header = operation->request->transfer_buffer; else if (gbuf == operation->response) - header = operation->response_payload; + header = operation->response->transfer_buffer; else header = NULL;