[PATCH 4/4] ratp: i2c: Do not return error
Sascha Hauer
s.hauer at pengutronix.de
Tue Sep 6 03:20:49 PDT 2022
The RATP command implementations should only return an error on internal
failures. When an i2c command failed we should return 0 though to
actually send the error message. Without it the remote would just wait
for a response until it times out.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
common/ratp/i2c.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/ratp/i2c.c b/common/ratp/i2c.c
index c14bbbf9b9..404ddd2ece 100644
--- a/common/ratp/i2c.c
+++ b/common/ratp/i2c.c
@@ -162,7 +162,7 @@ out:
*rsp = (struct ratp_bb *)i2c_read_rsp;
*rsp_len = i2c_read_rsp_len;
- return ret;
+ return 0;
}
BAREBOX_RATP_CMD_START(I2C_READ)
@@ -271,7 +271,7 @@ out:
*rsp = (struct ratp_bb *)i2c_write_rsp;
*rsp_len = sizeof(*i2c_write_rsp);
- return ret;
+ return 0;
}
BAREBOX_RATP_CMD_START(I2C_WRITE)
--
2.30.2
More information about the barebox
mailing list