[PATCH] [media] tm6000: Fix unused value in vidioc_try_fmt_vid_cap()
From: Zeng Jingxiang
Date: Thu Jul 28 2022 - 06:12:53 EST
From: Zeng Jingxiang <linuszeng@xxxxxxxxxxx>
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@xxxxxxxxxxx>
---
drivers/media/usb/tm6000/tm6000-video.c | 2 --
1 file changed, 2 deletions(-)
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);
--
2.27.0