-
Ben Walsh authored
cros_ec_lpc_mec_read_bytes and cros_ec_lpc_mec_write_bytes call cros_ec_lpc_mec_in_range, which checks if addresses are in the MEC address range, and returns -EINVAL if the range given is not sensible. However cros_ec_lpc_mec_in_range was also returning -EINVAL for a zero length range. A zero length range should not be an error condition. cros_ec_lpc_mec_in_range now returns 1 in this case. cros_ec_lpc_io_bytes_mec checks for zero length, and returns immediately without beginning a transfer. Fixes: 68dbac0a ("platform/chrome: cros_ec_lpc: MEC access can return error code") Fixes: 77a71432 ("platform/chrome: cros_ec_lpc: Fix error code in cros_ec_lpc_mec_read_bytes()") Signed-off-by: Ben Walsh <ben@jubnut.com> Link: https://lore.kernel.org/r/20240613212542.403-1-ben@jubnut.comSigned-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
b57cd570