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>
This commit is contained in:
Chris Green 2025-04-08 21:31:25 +01:00 committed by Hans Verkuil
parent 2a934fdb01
commit fdc33c5f89

View 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;