Skip to content
Commit c1778e58 authored by Guenter Roeck's avatar Guenter Roeck Committed by Lee Jones
Browse files

mfd: cros_ec_dev: Return number of bytes read with CROS_EC_DEV_IOCRDMEM



While ioctls normally return a negative error or 0 on success, this is not
the case for CROS_EC_DEV_IOCXCMD in the cros_ec driver, which returns the
number of bytes read instead. However, CROS_EC_DEV_IOCRDMEM in the same
driver does not return the number of byte read on success. This is both
inconsistent and problematic, since the amount of returned data can be
dynamic. Have it return the number of data bytes for consistency.

Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: default avatarBenson Leung <bleung@chromium.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 66265e71
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment