From 96fd8c2bfdda4b6a2223f235ebdd35e4d391d075 Mon Sep 17 00:00:00 2001 From: Alex Elder Date: Wed, 5 Nov 2014 16:03:08 -0600 Subject: [PATCH] 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 --- drivers/staging/greybus/operation.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/greybus/operation.c b/drivers/staging/greybus/operation.c index cc278bc..9cb9c9d 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; -- 2.7.4