diff --git a/drivers/staging/greybus/es1-ap-usb.c b/drivers/staging/greybus/es1-ap-usb.c index f23c67414ecf..360149923c17 100644 --- a/drivers/staging/greybus/es1-ap-usb.c +++ b/drivers/staging/greybus/es1-ap-usb.c @@ -126,7 +126,6 @@ static int alloc_gbuf_data(struct gbuf *gbuf, unsigned int size, gfp_t gfp_mask) buffer[0] = gbuf->cport_id; gbuf->transfer_buffer = &buffer[1]; gbuf->transfer_buffer_length = size; - gbuf->actual_length = size; /* When we send the gbuf, we need this pointer to be here */ gbuf->hdpriv = es1; diff --git a/drivers/staging/greybus/operation.c b/drivers/staging/greybus/operation.c index fe2f1a7137e5..75f6e50b2ee6 100644 --- a/drivers/staging/greybus/operation.c +++ b/drivers/staging/greybus/operation.c @@ -132,6 +132,7 @@ struct gb_operation *gb_operation_create(struct gb_connection *connection, kfree(operation); return NULL; } + gbuf->actual_length = size; /* Record what we'll use */ operation->connection = connection; /* XXX refcount? */