* [PATCH] i2c: s3c2410: fix returnvar.cocci warning
@ 2022-05-06 7:31 Yihao Han
2022-05-06 7:52 ` Krzysztof Kozlowski
0 siblings, 1 reply; 2+ messages in thread
From: Yihao Han @ 2022-05-06 7:31 UTC (permalink / raw)
To: Krzysztof Kozlowski, Alim Akhtar, linux-i2c, linux-arm-kernel,
linux-samsung-soc, linux-kernel
Cc: kernel, Yihao Han
Fix the following coccicheck warning:
drivers/i2c/busses/i2c-s3c2410.c:388:5-8: Unneeded variable: "ret".
Return "0" on line 551
Signed-off-by: Yihao Han <hanyihao@vivo.com>
---
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 b49a1b170bb2..6df85b23156c 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -385,7 +385,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.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] i2c: s3c2410: fix returnvar.cocci warning
2022-05-06 7:31 [PATCH] i2c: s3c2410: fix returnvar.cocci warning Yihao Han
@ 2022-05-06 7:52 ` Krzysztof Kozlowski
0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2022-05-06 7:52 UTC (permalink / raw)
To: Yihao Han, Alim Akhtar, linux-i2c, linux-arm-kernel,
linux-samsung-soc, linux-kernel
Cc: kernel
On 06/05/2022 09:31, Yihao Han wrote:
> Fix the following coccicheck warning:
>
> drivers/i2c/busses/i2c-s3c2410.c:388:5-8: Unneeded variable: "ret".
> Return "0" on line 551
>
> Signed-off-by: Yihao Han <hanyihao@vivo.com>
> ---
> drivers/i2c/busses/i2c-s3c2410.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
This was already reported:
https://lore.kernel.org/all/0d1a0027-e74d-9f07-3b96-372b5ca14ae3@canonical.com/
Please apply instead my previous suggestion.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-06 7:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-06 7:31 [PATCH] i2c: s3c2410: fix returnvar.cocci warning Yihao Han
2022-05-06 7:52 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).