DORMANTno replies

[PATCH] i2c: s3c2410: Remove unneeded variable "ret"

From: Tian Tao <tiantao6@hisilicon.com>
Date: 2021-03-25 09:38:02
Also in: linux-i2c, linux-samsung-soc
Subsystem: arm/samsung s3c, s5p and exynos arm architectures, i2c subsystem, i2c subsystem host drivers, the rest · Maintainers: Krzysztof Kozlowski, Wolfram Sang, Andi Shyti, Linus Torvalds

Fix the following coccicheck warning:
drivers/i2c/busses/i2c-s3c2410.c:391:5-8:
Unneeded variable : returnvar : "ret". Return "0" on line 551

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Signed-off-by: Zihao Tang <redacted>
---
 drivers/i2c/busses/i2c-s3c2410.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 62a903f..22474e6 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -388,7 +388,6 @@ static int i2c_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
 {
 	unsigned long tmp;
 	unsigned char byte;
-	int ret = 0;
 
 	switch (i2c->state) {
 
@@ -548,7 +547,7 @@ static int i2c_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
 	tmp &= ~S3C2410_IICCON_IRQPEND;
 	writel(tmp, i2c->regs + S3C2410_IICCON);
  out:
-	return ret;
+	return 0;
 }
 
 /*
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help