[PATCH 28/29][SRU][OEM-5.14] UBUNTU: SAUCE: i2c-ljca: fix a potential issue

You-Sheng Yang vicamo.yang at canonical.com
Tue Dec 28 06:19:54 UTC 2021


From: Ye Xiang <xiang.ye at intel.com>

BugLink: https://bugs.launchpad.net/bugs/1955383

Signed-off-by: Ye Xiang <xiang.ye at intel.com>
(cherry picked from
https://github.com/intel/ivsc-driver/commit/cf218331b4a149865621b7b1f4435a59bb4d07c1)
Signed-off-by: You-Sheng Yang <vicamo.yang at canonical.com>
---
 drivers/i2c/busses/i2c-ljca.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-ljca.c b/drivers/i2c/busses/i2c-ljca.c
index bec6d8a02ae8..3abf0df5254a 100644
--- a/drivers/i2c/busses/i2c-ljca.c
+++ b/drivers/i2c/busses/i2c-ljca.c
@@ -288,7 +288,7 @@ static int ljca_i2c_xfer(struct i2c_adapter *adapter, struct i2c_msg *msg,
 	if (!ljca_i2c)
 		return -EINVAL;
 
-	for (i = 0; !ret && i < num; i++) {
+	for (i = 0; i < num; i++) {
 		cur_msg = &msg[i];
 		dev_dbg(&adapter->dev, "i:%d msg:(%d %d)\n", i, cur_msg->flags,
 			cur_msg->len);
-- 
2.33.1




More information about the kernel-team mailing list