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 <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
This commit is contained in:
Alex Elder 2014-11-05 16:03:08 -06:00 committed by Greg Kroah-Hartman
parent 2dcf6871dd
commit 96fd8c2bfd

View file

@ -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;