diff options
author | 2025-04-08 21:31:25 +0100 | |
---|---|---|
committer | 2025-05-09 11:55:06 +0200 | |
commit | fdc33c5f89832066d8086745e8e2fba9c81b8eb9 (patch) | |
tree | 96eaa57d5413f37291b27e8646efecb6a34c6a43 | |
parent | media: v4l2-dev: fix error handling in __video_register_device() (diff) | |
download | linux-rng-fdc33c5f89832066d8086745e8e2fba9c81b8eb9.tar.xz linux-rng-fdc33c5f89832066d8086745e8e2fba9c81b8eb9.zip |
media: v4l: subdev: Fix coverity issue: Logically dead code
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>
-rw-r--r-- | drivers/media/v4l2-core/v4l2-ioctl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index e97881f74c0d..78f217768ae7 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -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; |