From: Alexandre Bailon Date: Wed, 14 Jan 2015 09:23:49 +0000 (+0100) Subject: greybus: i2c-gb: fix bad message size in gb_i2c X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~1732 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e2ed07f1e6926d5b6da8bc29c1ec552ecdb7085b;p=karo-tx-linux.git greybus: i2c-gb: fix bad message size in gb_i2c The data_in_size variable was set to 1 for the status byte. But now, the status byte has move to header. Then, the status byte is "allocated" twice and cause bad message size error. Signed-off-by: Alexandre Bailon Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/i2c-gb.c b/drivers/staging/greybus/i2c-gb.c index 3b86258d2dcf..c967ae3161c5 100644 --- a/drivers/staging/greybus/i2c-gb.c +++ b/drivers/staging/greybus/i2c-gb.c @@ -199,7 +199,7 @@ gb_i2c_transfer_request(struct gb_connection *connection, struct gb_i2c_transfer_op *op; struct i2c_msg *msg; u32 data_out_size = 0; - u32 data_in_size = 1; /* Response begins with a status byte */ + u32 data_in_size = 0; size_t request_size; void *data; u16 op_count;