From: Chris Green Date: Tue, 8 Apr 2025 20:31:25 +0000 (+0100) Subject: media: v4l: subdev: Fix coverity issue: Logically dead code X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=fdc33c5f89832066d8086745e8e2fba9c81b8eb9;p=users%2Fwilly%2Flinux.git 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 Signed-off-by: Hans Verkuil --- 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;