diff options
author | Ben Walsh <ben@jubnut.com> | 2024-06-14 00:25:42 +0300 |
---|---|---|
committer | Tzung-Bi Shih <tzungbi@kernel.org> | 2024-06-14 05:47:25 +0300 |
commit | b57cd5703a1618e87772094ac12c5ee7d6c35e2f (patch) | |
tree | 1aae33d4e738d7f97630e4703e381d3319957d4c /scripts/gdb/linux/tasks.py | |
parent | 77a714325d09e1527d865dc011ef91c4972ffedd (diff) | |
download | linux-b57cd5703a1618e87772094ac12c5ee7d6c35e2f.tar.xz |
platform/chrome: cros_ec_lpc: Handle zero length read/write
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: 68dbac0a58ef ("platform/chrome: cros_ec_lpc: MEC access can return error code")
Fixes: 77a714325d09 ("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.com
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
0 files changed, 0 insertions, 0 deletions