From: Stefan Bader Date: Mon, 2 May 2022 09:55:37 +0000 (+0200) Subject: Revert "UBUNTU: SAUCE: i2c-ljca: fix a potential issue" X-Git-Tag: Ubuntu-5.15.0-29.30~32 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=5b59b6847bc14b10fabb35638f28a28bd2020bbe;p=mirror_ubuntu-jammy-kernel.git Revert "UBUNTU: SAUCE: i2c-ljca: fix a potential issue" BugLink: https://bugs.launchpad.net/bugs/1955383 This reverts commit c69c6bf972bf09d3186b11602179fb9b72862b41. Signed-off-by: Stefan Bader --- diff --git a/drivers/i2c/busses/i2c-ljca.c b/drivers/i2c/busses/i2c-ljca.c index 3abf0df5254a..bec6d8a02ae8 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; i < num; i++) { + for (i = 0; !ret && i < num; i++) { cur_msg = &msg[i]; dev_dbg(&adapter->dev, "i:%d msg:(%d %d)\n", i, cur_msg->flags, cur_msg->len);