linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: atmel: atmel-isc: Remove redundant assignment to i
@ 2021-05-17 10:07 Jiapeng Chong
  0 siblings, 0 replies; only message in thread
From: Jiapeng Chong @ 2021-05-17 10:07 UTC (permalink / raw)
  To: eugen.hristev
  Cc: mchehab, nicolas.ferre, alexandre.belloni, ludovic.desroches,
	linux-media, linux-arm-kernel, linux-kernel, Jiapeng Chong

Variable i is being assigned a value however the assignment is
never read, so this redundant assignment can be removed.

Clean up the following clang-analyzer warning:

drivers/media/platform/atmel/atmel-isc-base.c:975:2: warning: Value
stored to 'i' is never read [clang-analyzer-deadcode.DeadStores].

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/media/platform/atmel/atmel-isc-base.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/platform/atmel/atmel-isc-base.c b/drivers/media/platform/atmel/atmel-isc-base.c
index ce8e135..a017572c 100644
--- a/drivers/media/platform/atmel/atmel-isc-base.c
+++ b/drivers/media/platform/atmel/atmel-isc-base.c
@@ -972,7 +972,6 @@ static int isc_enum_fmt_vid_cap(struct file *file, void *priv,
 
 	index -= ARRAY_SIZE(controller_formats);
 
-	i = 0;
 	supported_index = 0;
 
 	for (i = 0; i < ARRAY_SIZE(formats_list); i++) {
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-17 10:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-17 10:07 [PATCH] media: atmel: atmel-isc: Remove redundant assignment to i Jiapeng Chong

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).