aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/completion.c
diff options
context:
space:
mode:
authorAlex Elder <[email protected]>2025-06-16 12:51:36 +0000
committerWolfram Sang <[email protected]>2025-06-21 20:17:02 +0000
commita6c23dac756b9541b33aa3bcd30f464df2879209 (patch)
tree4d081161d45d50bfefeef98ad2e22eda2f1cb26a /rust/helpers/completion.c
parentMerge tag 'i2c-host-fixes-6.16-rc2' of git://git.kernel.org/pub/scm/linux/ker... (diff)
downloadkernel-a6c23dac756b9541b33aa3bcd30f464df2879209.tar.gz
kernel-a6c23dac756b9541b33aa3bcd30f464df2879209.zip
i2c: k1: check for transfer error
If spacemit_i2c_xfer_msg() times out waiting for a message transfer to complete, or if the hardware reports an error, it returns a negative error code (-ETIMEDOUT, -EAGAIN, -ENXIO. or -EIO). The sole caller of spacemit_i2c_xfer_msg() is spacemit_i2c_xfer(), which is the i2c_algorithm->xfer callback function. It currently does not save the value returned by spacemit_i2c_xfer_msg(). The result is that transfer errors go unreported, and a caller has no indication anything is wrong. When this code was out for review, the return value *was* checked in early versions. But for some reason, that assignment got dropped between versions 5 and 6 of the series, perhaps related to reworking the code to merge spacemit_i2c_xfer_core() into spacemit_i2c_xfer(). Simply assigning the value returned to "ret" fixes the problem. Fixes: 5ea558473fa31 ("i2c: spacemit: add support for SpacemiT K1 SoC") Signed-off-by: Alex Elder <[email protected]> Cc: <[email protected]> # v6.15+ Reviewed-by: Troy Mitchell <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Andi Shyti <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
Diffstat (limited to 'rust/helpers/completion.c')
0 files changed, 0 insertions, 0 deletions