diff mbox series

[media] tm6000: Fix unused value in vidioc_try_fmt_vid_cap()

Message ID 20220728101236.1909269-1-zengjx95@gmail.com
State New
Headers show
Series [media] tm6000: Fix unused value in vidioc_try_fmt_vid_cap() | expand

Commit Message

Zeng Jingxiang July 28, 2022, 10:12 a.m. UTC
From: Zeng Jingxiang <linuszeng@tencent.com>

Coverity warns uf an unused value:

assigned_value: Assign the value of the variable f->fmt.pix.field
to field here,  but that stored value is overwritten.
before it can be used.
919	field = f->fmt.pix.field;
920

value_overwrite: Overwriting previous write to field with
the value of V4L2_FIELD_INTERLACED.
921	field = V4L2_FIELD_INTERLACED;

Fixes: ed57256f6fe8 ("[media] tm6000: fix G/TRY_FMT")
Signed-off-by: Zeng Jingxiang <linuszeng@tencent.com>
---
 drivers/media/usb/tm6000/tm6000-video.c | 2 --
 1 file changed, 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/tm6000-video.c
index d855a19551f3..e06ed21edbdd 100644
--- a/drivers/media/usb/tm6000/tm6000-video.c
+++ b/drivers/media/usb/tm6000/tm6000-video.c
@@ -916,8 +916,6 @@  static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
 		return -EINVAL;
 	}
 
-	field = f->fmt.pix.field;
-
 	field = V4L2_FIELD_INTERLACED;
 
 	tm6000_get_std_res(dev);