]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
greybus: i2c-gb: fix bad message size in gb_i2c
authorAlexandre Bailon <abailon@baylibre.com>
Wed, 14 Jan 2015 09:23:49 +0000 (10:23 +0100)
committerGreg Kroah-Hartman <greg@kroah.com>
Wed, 14 Jan 2015 21:12:07 +0000 (13:12 -0800)
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 <abailon@baylibre.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/i2c-gb.c

index 3b86258d2dcfd85fbf916f245c3652a82f0950ff..c967ae3161c55e9dcdfa601891825820a10899e5 100644 (file)
@@ -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;