summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2021-10-30 16:19:54 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2021-11-01 10:10:44 +0100
commitccec12cddd8d16db8b661837e6fd68f6b62e7878 (patch)
tree5f96c00e3b6a3131ee63a7cb56aa1f0efe1cd475 /drivers/i2c
parent94ccc983f2d1807dafa8f5c72c8ef817ce438232 (diff)
downloadbarebox-ccec12cddd8d16db8b661837e6fd68f6b62e7878.tar.gz
barebox-ccec12cddd8d16db8b661837e6fd68f6b62e7878.tar.xz
I2C: i.MX: early: replace zero-valued variable use with zero directly
There is a if (ret) return -EAGAIN a few lines above, so if we reach the final return, ret must be zero. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20211030141954.2207820-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-imx-early.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-imx-early.c b/drivers/i2c/busses/i2c-imx-early.c
index 472e4be83a..b381f99f40 100644
--- a/drivers/i2c/busses/i2c-imx-early.c
+++ b/drivers/i2c/busses/i2c-imx-early.c
@@ -126,7 +126,7 @@ static int i2c_fsl_start(struct fsl_i2c *fsl_i2c)
temp |= I2CR_MTX | I2CR_TXAK;
fsl_i2c_write_reg(temp, fsl_i2c, FSL_I2C_I2CR);
- return ret;
+ return 0;
}
static void i2c_fsl_stop(struct fsl_i2c *fsl_i2c)