linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: gspca: remove redundant assignment of variable n
@ 2022-01-30 22:31 Colin Ian King
  0 siblings, 0 replies; only message in thread
From: Colin Ian King @ 2022-01-30 22:31 UTC (permalink / raw)
  To: Hans Verkuil, Mauro Carvalho Chehab, linux-media
  Cc: kernel-janitors, linux-kernel

The variable n is being assigned a value that is never read, it is
being reassigned a different value a few statements later. The
assignment is redundant and can be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/media/usb/gspca/pac7302.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/usb/gspca/pac7302.c b/drivers/media/usb/gspca/pac7302.c
index 2e8c3ef51ca3..608be0d64f94 100644
--- a/drivers/media/usb/gspca/pac7302.c
+++ b/drivers/media/usb/gspca/pac7302.c
@@ -794,7 +794,6 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
 		n = (sof - data) - (footer_length + sizeof pac_sof_marker);
 		if (n < 0) {
 			gspca_dev->image_len += n;
-			n = 0;
 		} else {
 			gspca_frame_add(gspca_dev, INTER_PACKET, data, n);
 		}
-- 
2.34.1


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

only message in thread, other threads:[~2022-01-30 22:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-30 22:31 [PATCH] media: gspca: remove redundant assignment of variable n Colin Ian King

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