From: Ismael Luceno Cortes Date: Thu, 7 Mar 2019 18:00:53 +0000 (+0000) Subject: i2c: rcar_i2c: Don't mask errors with EREMOTEIO at rcar_i2c_xfer X-Git-Tag: v2025.01-rc5-pxa1908~3092^2~2 X-Git-Url: http://git.dujemihanovic.xyz/%22/img/sics.gif/%22/static/git-favicon.png?a=commitdiff_plain;h=ff4035be9bd1ef60f5cf772539304ac1ee728fbb;p=u-boot.git i2c: rcar_i2c: Don't mask errors with EREMOTEIO at rcar_i2c_xfer Fix rcar_i2c_xfer return value, previously it was always returning -EREMOTEIO when dealing with errors from calls to the read/write functions. Signed-off-by: Ismael Luceno Reviewed-by: Marek Vasut Reviewed-by: Heiko Schocher --- diff --git a/drivers/i2c/rcar_i2c.c b/drivers/i2c/rcar_i2c.c index a88fbcf34f..9223eaecbf 100644 --- a/drivers/i2c/rcar_i2c.c +++ b/drivers/i2c/rcar_i2c.c @@ -221,7 +221,7 @@ static int rcar_i2c_xfer(struct udevice *dev, struct i2c_msg *msg, int nmsgs) ret = rcar_i2c_write_common(dev, msg); if (ret) - return -EREMOTEIO; + return ret; } return ret;