summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/cros_ec_spi.c
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2014-06-18 20:14:06 +0200
committerLee Jones <lee.jones@linaro.org>2014-07-09 15:58:20 +0200
commit12ebc8a50bc54e3a6fe207861fc6793181f9c2dc (patch)
tree2375f0509badbfb00479cdc58d19a332aa9158b4 /drivers/mfd/cros_ec_spi.c
parentmfd: cros_ec: Check result code from EC messages (diff)
downloadlinux-12ebc8a50bc54e3a6fe207861fc6793181f9c2dc.tar.xz
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/mfd/cros_ec_spi.c')
-rw-r--r--drivers/mfd/cros_ec_spi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/cros_ec_spi.c b/drivers/mfd/cros_ec_spi.c
index da1da05cd546..ac52e3653e90 100644
--- a/drivers/mfd/cros_ec_spi.c
+++ b/drivers/mfd/cros_ec_spi.c
@@ -320,7 +320,7 @@ static int cros_ec_cmd_xfer_spi(struct cros_ec_device *ec_dev,
goto exit;
}
- ret = 0;
+ ret = len;
exit:
mutex_unlock(&ec_spi->lock);
return ret;