Alex Elder
a6c23dac75
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: 5ea558473f ("i2c: spacemit: add support for SpacemiT K1 SoC")
Signed-off-by: Alex Elder <elder@riscstar.com >
Cc: <stable@vger.kernel.org > # v6.15+
Reviewed-by: Troy Mitchell <troymitchell988@gmail.com >
Link: https://lore.kernel.org/r/20250616125137.1555453-1-elder@riscstar.com
Signed-off-by: Andi Shyti <andi@smida.it >
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com >
2025-06-21 22:17:02 +02:00
..
2019-06-19 17:09:55 +02:00
2025-03-12 12:24:52 +01:00
2025-03-12 12:24:52 +01:00
2024-07-09 00:46:06 +02:00
2024-11-17 11:58:14 +01:00
2025-01-14 11:09:47 +01:00
2024-01-18 21:10:41 +01:00
2025-03-18 21:53:53 +01:00
2025-03-20 14:37:47 +01:00
2025-06-12 10:05:31 +02:00
2022-11-01 13:41:22 +01:00
2025-06-12 10:05:31 +02:00
2024-11-17 11:58:14 +01:00
2025-06-12 10:05:31 +02:00
2024-06-12 17:07:33 +01:00
2020-11-03 21:34:40 +01:00
2024-11-17 11:58:14 +01:00
2025-06-12 10:05:31 +02:00
2024-11-17 11:58:14 +01:00
2025-06-12 10:05:31 +02:00
2025-03-18 21:53:54 +01:00
2025-03-18 21:53:54 +01:00
2025-06-12 10:05:31 +02:00
2024-11-17 11:58:14 +01:00
2024-07-09 00:46:06 +02:00
2022-02-15 10:04:53 +01:00
2025-06-12 10:05:31 +02:00
2025-05-16 21:06:09 +02:00
2024-07-11 15:13:30 +02:00
2024-11-17 11:58:14 +01:00
2025-04-13 21:33:44 +02:00
2025-05-19 22:23:57 +02:00
2025-05-19 22:23:56 +02:00
2025-03-18 21:53:53 +01:00
2022-02-11 15:38:23 +01:00
2025-05-23 10:02:27 +02:00
2024-11-24 16:03:51 +01:00
2025-03-18 21:53:53 +01:00
2025-05-14 17:28:24 +02:00
2025-05-19 22:23:55 +02:00
2025-05-23 10:02:27 +02:00
2024-11-17 11:58:14 +01:00
2024-07-11 15:14:08 +02:00
2024-11-17 11:58:14 +01:00
2025-06-12 10:05:31 +02:00
2024-01-18 21:10:41 +01:00
2025-06-12 10:05:31 +02:00
2025-06-12 10:05:31 +02:00
2024-07-11 15:14:09 +02:00
2024-11-17 11:58:14 +01:00
2025-06-12 10:05:31 +02:00
2024-11-17 11:58:14 +01:00
2024-07-11 15:14:10 +02:00
2024-11-17 11:58:14 +01:00
2019-05-30 11:26:37 -07:00
2025-05-19 22:23:57 +02:00
2025-03-18 21:53:54 +01:00
2019-05-30 11:26:32 -07:00
2022-08-11 23:02:51 +02:00
2025-06-12 10:05:31 +02:00
2025-06-12 10:05:31 +02:00
2025-06-12 10:05:31 +02:00
2024-11-17 11:58:14 +01:00
2019-07-15 21:10:39 -07:00
2025-01-07 23:46:10 +01:00
2025-05-19 22:23:57 +02:00
2024-11-17 11:58:14 +01:00
2025-06-21 22:17:02 +02:00
2025-06-12 10:05:31 +02:00
2025-03-18 21:53:54 +01:00
2024-12-02 11:34:44 -08:00
2025-05-19 22:23:54 +02:00
2025-02-26 23:23:33 +01:00
2025-06-12 10:05:31 +02:00
2025-06-12 10:05:31 +02:00
2025-06-12 10:05:31 +02:00
2025-05-23 10:02:27 +02:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2025-06-12 10:05:31 +02:00
2025-03-18 21:53:54 +01:00
2025-03-18 21:53:54 +01:00
2025-06-12 10:05:31 +02:00
2024-11-17 11:58:14 +01:00
2025-06-12 10:05:31 +02:00
2025-06-12 10:05:31 +02:00
2024-10-02 17:23:23 -04:00
2024-11-17 11:58:14 +01:00
2025-05-19 22:23:55 +02:00
2025-05-19 22:23:55 +02:00
2024-11-17 11:58:14 +01:00
2025-06-12 10:05:31 +02:00
2024-11-17 11:58:14 +01:00
2024-07-11 15:14:17 +02:00
2024-07-03 16:44:22 +02:00
2025-05-19 22:23:57 +02:00
2022-11-12 21:30:16 +01:00
2025-05-19 22:23:55 +02:00
2024-11-17 11:58:14 +01:00
2021-01-26 07:42:27 +01:00
2024-11-17 11:58:14 +01:00
2025-05-30 10:07:53 -07:00
2024-11-13 23:29:46 +01:00
2025-06-12 10:05:31 +02:00
2025-05-20 22:49:21 +02:00
2024-09-10 00:33:52 +02:00
2025-06-12 10:05:31 +02:00
2025-06-12 10:05:31 +02:00
2025-06-12 10:05:31 +02:00
2025-06-12 10:05:31 +02:00
2025-06-12 10:05:31 +02:00
2025-05-19 22:23:57 +02:00
2024-11-17 11:58:14 +01:00
2024-07-11 15:14:20 +02:00
2024-11-17 11:58:57 +01:00
2025-05-19 22:23:54 +02:00
2025-06-12 10:05:31 +02:00
2024-11-17 11:58:14 +01:00
2025-06-12 10:05:31 +02:00
2025-06-12 10:05:31 +02:00
2024-01-18 21:10:41 +01:00
2024-11-17 11:58:14 +01:00
2024-01-18 21:10:41 +01:00
2025-03-12 12:24:53 +01:00
2024-07-11 15:14:20 +02:00
2024-11-17 11:58:14 +01:00
2024-11-17 11:58:14 +01:00
2020-09-21 11:45:43 +02:00
2019-08-14 14:56:54 +02:00
2024-11-17 11:58:14 +01:00
2025-06-12 10:05:31 +02:00
2024-11-17 11:58:14 +01:00
2025-06-12 10:05:31 +02:00
2024-07-11 15:14:22 +02:00
2024-11-17 11:58:14 +01:00
2025-06-12 10:05:31 +02:00
2025-05-19 22:23:57 +02:00
2025-05-23 17:28:07 +02:00
2025-05-19 22:23:55 +02:00
2025-05-19 22:23:55 +02:00
2024-11-17 11:58:14 +01:00
2025-05-19 22:23:55 +02:00
2024-07-11 15:14:24 +02:00
2024-06-26 16:07:21 +02:00
2025-05-23 10:02:27 +02:00
2024-07-11 15:14:24 +02:00
2025-05-19 22:23:55 +02:00
2025-05-23 17:28:07 +02:00
2025-05-19 22:23:55 +02:00
2025-05-23 10:02:27 +02:00
2025-06-12 10:05:31 +02:00
2025-06-12 10:05:31 +02:00
2025-05-30 10:07:53 -07:00
2025-05-19 22:23:56 +02:00
2025-05-19 22:23:55 +02:00