]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: v4l: subdev: Fix coverity issue: Logically dead code
authorChris Green <chris.e.green@hotmail.com>
Tue, 8 Apr 2025 20:31:25 +0000 (21:31 +0100)
committerHans Verkuil <hverkuil@xs4all.nl>
Fri, 9 May 2025 09:55:06 +0000 (11:55 +0200)
The conditional (type == V4L2_TUNER_RADIO) always evaluates true due to the
earlier check for (type != V4L2_TUNER_RADIO) (line 2826)

CID: 1226742

Signed-off-by: Chris Green <chris.e.green@hotmail.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/v4l2-core/v4l2-ioctl.c

index e97881f74c0d7778db5a988e9550d4124e6768ac..78f217768ae7b95191182f2d91a4a99cbe3e5a85 100644 (file)
@@ -2835,8 +2835,7 @@ static int v4l_enum_freq_bands(const struct v4l2_ioctl_ops *ops,
                p->capability = m.capability | V4L2_TUNER_CAP_FREQ_BANDS;
                p->rangelow = m.rangelow;
                p->rangehigh = m.rangehigh;
-               p->modulation = (type == V4L2_TUNER_RADIO) ?
-                       V4L2_BAND_MODULATION_FM : V4L2_BAND_MODULATION_VSB;
+               p->modulation = V4L2_BAND_MODULATION_FM;
                return 0;
        }
        return -ENOTTY;