提交 a7f404af 编写于 作者: H Hans Verkuil 提交者: Mauro Carvalho Chehab

[media] v4l2-ioctl.c: fix enum_freq_bands handling

If the driver supports enum_freq_bands, but only for certain device
nodes, then it may return -ENOTTY. But in that case the code should
fall into the fall-back case where the current tuner/modulator range
is returned.
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
上级 ce71bbc9
......@@ -2042,8 +2042,11 @@ static int v4l_enum_freq_bands(const struct v4l2_ioctl_ops *ops,
if (type != p->type)
return -EINVAL;
}
if (ops->vidioc_enum_freq_bands)
return ops->vidioc_enum_freq_bands(file, fh, p);
if (ops->vidioc_enum_freq_bands) {
err = ops->vidioc_enum_freq_bands(file, fh, p);
if (err != -ENOTTY)
return err;
}
if (is_valid_ioctl(vfd, VIDIOC_G_TUNER)) {
struct v4l2_tuner t = {
.index = p->tuner,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册