mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] I2C: i.MX: early: replace zero-valued variable use with zero directly
@ 2021-10-30 14:19 Ahmad Fatoum
  2021-11-01  9:10 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2021-10-30 14:19 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

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>
---
 drivers/i2c/busses/i2c-imx-early.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-imx-early.c b/drivers/i2c/busses/i2c-imx-early.c
index 472e4be83a70..b381f99f4003 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)
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] I2C: i.MX: early: replace zero-valued variable use with zero directly
  2021-10-30 14:19 [PATCH] I2C: i.MX: early: replace zero-valued variable use with zero directly Ahmad Fatoum
@ 2021-11-01  9:10 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2021-11-01  9:10 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On Sat, Oct 30, 2021 at 04:19:54PM +0200, Ahmad Fatoum wrote:
> 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>
> ---
>  drivers/i2c/busses/i2c-imx-early.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha

> 
> diff --git a/drivers/i2c/busses/i2c-imx-early.c b/drivers/i2c/busses/i2c-imx-early.c
> index 472e4be83a70..b381f99f4003 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)
> -- 
> 2.30.2
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-01  9:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-30 14:19 [PATCH] I2C: i.MX: early: replace zero-valued variable use with zero directly Ahmad Fatoum
2021-11-01  9:10 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox