From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 4/4] ratp: i2c: Do not return error
Date: Tue, 6 Sep 2022 12:20:49 +0200 [thread overview]
Message-ID: <20220906102049.1364561-5-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20220906102049.1364561-1-s.hauer@pengutronix.de>
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@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
prev parent reply other threads:[~2022-09-06 10:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-06 10:20 [PATCH 0/4] RATP updates Sascha Hauer
2022-09-06 10:20 ` [PATCH 1/4] remove local pyserial Sascha Hauer
2022-09-06 10:20 ` [PATCH 2/4] bbremote: Convert to python3 Sascha Hauer
2022-09-06 13:02 ` Jan Lübbe
2022-09-08 8:16 ` Sascha Hauer
2022-09-06 10:20 ` [PATCH 3/4] ratp: getenv: Do not crash on non-existing variables Sascha Hauer
2022-09-06 10:20 ` Sascha Hauer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220906102049.1364561-5-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox