media: s2255drv: remove redundant assignment to variable field
authorColin Ian King <colin.king@canonical.com>
Fri, 9 Apr 2021 09:15:31 +0000 (11:15 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 19 May 2021 07:51:39 +0000 (09:51 +0200)
The variable 'field' is being assigned a value this is never read,
it is being updated in all the following if/else combinations. The
assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/usb/s2255/s2255drv.c

index 4af55e2478be19ef0cd85c723bdb8e3596455426..3b0e4ed75d99c69815dc256eb2396910b00dea78 100644 (file)
@@ -767,8 +767,6 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
        if (fmt == NULL)
                return -EINVAL;
 
-       field = f->fmt.pix.field;
-
        dprintk(vc->dev, 50, "%s NTSC: %d suggested width: %d, height: %d\n",
                __func__, is_ntsc, f->fmt.pix.width, f->fmt.pix.height);
        if (is_ntsc) {