[PATCH v2 4/5] ratp: i2c: Do not return error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux