提交 e070f1b4 编写于 作者: W Wei Yongjun 提交者: Mauro Carvalho Chehab

[media] davinci: vpif_capture: fix return type check for v4l2_subdev_call()

The v4l2_subdev_call() call returns -ENODEV when subdev is
null and -ENOIOCTLCMD wnen no icotl is present.
This patch fixes the return type check for v4l2_subdev_call().
The pattern E == C1 && E == C2 is always false. This patch
fix this according to the assumption that && should be ||.
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
[prabhakar.lad@ti.com: reword commit message]
Signed-off-by: NLad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 864a1212
...@@ -1715,7 +1715,7 @@ vpif_enum_dv_timings(struct file *file, void *priv, ...@@ -1715,7 +1715,7 @@ vpif_enum_dv_timings(struct file *file, void *priv,
int ret; int ret;
ret = v4l2_subdev_call(ch->sd, video, enum_dv_timings, timings); ret = v4l2_subdev_call(ch->sd, video, enum_dv_timings, timings);
if (ret == -ENOIOCTLCMD && ret == -ENODEV) if (ret == -ENOIOCTLCMD || ret == -ENODEV)
return -EINVAL; return -EINVAL;
return ret; return ret;
} }
...@@ -1735,7 +1735,7 @@ vpif_query_dv_timings(struct file *file, void *priv, ...@@ -1735,7 +1735,7 @@ vpif_query_dv_timings(struct file *file, void *priv,
int ret; int ret;
ret = v4l2_subdev_call(ch->sd, video, query_dv_timings, timings); ret = v4l2_subdev_call(ch->sd, video, query_dv_timings, timings);
if (ret == -ENOIOCTLCMD && ret == -ENODEV) if (ret == -ENOIOCTLCMD || ret == -ENODEV)
return -ENODATA; return -ENODATA;
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部