Merge tag 'ubifixes-for-v2023-07-rc4' of https://source.denx.de/u-boot/custodians/u-boot-ubi

ubifs changes for v2023.07-rc4

UBIFS fixes from Ben Dooks

- ubifs: allow loading to above 4GiB
diff --git a/drivers/i2c/i2c-cdns.c b/drivers/i2c/i2c-cdns.c
index 1a89207..935b2ac 100644
--- a/drivers/i2c/i2c-cdns.c
+++ b/drivers/i2c/i2c-cdns.c
@@ -444,7 +444,7 @@
 
 	debug("i2c_xfer: %d messages\n", nmsgs);
 	for (u8 retry = 0; retry < CDNS_I2C_ARB_LOST_MAX_RETRIES &&
-	     nmsgs > 0; nmsgs--, msg++) {
+	     nmsgs > 0;) {
 		debug("i2c_xfer: chip=0x%x, len=0x%x\n", msg->addr, msg->len);
 		if (msg->flags & I2C_M_RD) {
 			ret = cdns_i2c_read_data(i2c_bus, msg->addr, msg->buf,
@@ -461,7 +461,8 @@
 			       retry);
 			continue;
 		}
-
+		nmsgs--;
+		msg++;
 		if (ret) {
 			debug("i2c_write: error sending\n");
 			return -EREMOTEIO;
diff --git a/drivers/i2c/rk_i2c.c b/drivers/i2c/rk_i2c.c
index f8fac45..9927af9 100644
--- a/drivers/i2c/rk_i2c.c
+++ b/drivers/i2c/rk_i2c.c
@@ -342,7 +342,7 @@
 			     int nmsgs)
 {
 	struct rk_i2c *i2c = dev_get_priv(bus);
-	int ret;
+	int ret = 0;
 
 	debug("i2c_xfer: %d messages\n", nmsgs);
 	for (; nmsgs > 0; nmsgs--, msg++) {
@@ -356,14 +356,15 @@
 		}
 		if (ret) {
 			debug("i2c_write: error sending\n");
-			return -EREMOTEIO;
+			ret = -EREMOTEIO;
+			break;
 		}
 	}
 
 	rk_i2c_send_stop_bit(i2c);
 	rk_i2c_disable(i2c);
 
-	return 0;
+	return ret;
 }
 
 int rockchip_i2c_set_bus_speed(struct udevice *bus, unsigned int speed)