On Thu, Jun 13, 2024 at 10:25:42PM +0100, Ben Walsh wrote: > 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. > > Signed-off-by: Ben Walsh <ben@xxxxxxxxxx> Ideally this would have a Fixes tag that points to my commit. regards, dan carpenter