diff options
author | Tzung-Bi Shih <tzungbi@kernel.org> | 2022-05-13 12:41:38 +0800 |
---|---|---|
committer | Tzung-Bi Shih <tzungbi@kernel.org> | 2022-05-16 10:01:51 +0800 |
commit | 71d3ae7fb6404c87b498f8b7f86b8271dd74989f (patch) | |
tree | 269112af14e973dfa6a424fd8a4bbd02e2b20d81 /drivers/platform/chrome/cros_ec_proto.c | |
parent | 42701e7c0cd2a715def2dafd22f11f25ca0f5024 (diff) | |
download | linux-71d3ae7fb6404c87b498f8b7f86b8271dd74989f.tar.bz2 |
platform/chrome: correct cros_ec_prepare_tx() usage
cros_ec_prepare_tx() returns either:
- >= 0 for number of prepared bytes.
- < 0 for -errno.
Correct the comment and make sure all callers check the return code.
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20220513044143.1045728-3-tzungbi@kernel.org
Diffstat (limited to 'drivers/platform/chrome/cros_ec_proto.c')
-rw-r--r-- | drivers/platform/chrome/cros_ec_proto.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/chrome/cros_ec_proto.c b/drivers/platform/chrome/cros_ec_proto.c index db1c8ba43171..2d6d3fbfa905 100644 --- a/drivers/platform/chrome/cros_ec_proto.c +++ b/drivers/platform/chrome/cros_ec_proto.c @@ -164,7 +164,7 @@ static int send_command(struct cros_ec_device *ec_dev, * only SPI uses it. Once LPC uses the same protocol it can start using it. * I2C could use it now, with a refactor of the existing code. * - * Return: 0 on success or negative error code. + * Return: number of prepared bytes on success or negative error code. */ int cros_ec_prepare_tx(struct cros_ec_device *ec_dev, struct cros_ec_command *msg) |