summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2014-06-18 11:14:06 -0700
committerLee Jones <lee.jones@linaro.org>2014-07-09 14:58:20 +0100
commit12ebc8a50bc54e3a6fe207861fc6793181f9c2dc (patch)
tree2375f0509badbfb00479cdc58d19a332aa9158b4 /drivers/i2c
parent6db07b6336589ff480528173e41f8f6af3f0097f (diff)
downloadlinux-12ebc8a50bc54e3a6fe207861fc6793181f9c2dc.tar.gz
linux-12ebc8a50bc54e3a6fe207861fc6793181f9c2dc.tar.bz2
linux-12ebc8a50bc54e3a6fe207861fc6793181f9c2dc.zip
mfd: cros_ec: ec_dev->cmd_xfer() returns number of bytes received from EC
When communicating with the EC, the cmd_xfer() function should return the number of bytes it received from the EC, or negative on error. Signed-off-by: Bill Richardson <wfrichar@chromium.org> Signed-off-by: Doug Anderson <dianders@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-cros-ec-tunnel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-cros-ec-tunnel.c b/drivers/i2c/busses/i2c-cros-ec-tunnel.c
index dd07818d03d0..05e033c98115 100644
--- a/drivers/i2c/busses/i2c-cros-ec-tunnel.c
+++ b/drivers/i2c/busses/i2c-cros-ec-tunnel.c
@@ -228,7 +228,7 @@ static int ec_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg i2c_msgs[],
msg.insize = response_len;
result = bus->ec->cmd_xfer(bus->ec, &msg);
- if (result)
+ if (result < 0)
goto exit;
result = ec_i2c_parse_response(response, i2c_msgs, &num);