diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-10-30 13:45:00 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-11-22 15:17:02 +0100 |
commit | e070f1b47ee9f3591f93a205a3d8b0b06bb0afb5 (patch) | |
tree | e16bf3667dd47ba80e78ec229e38e63ef3842469 | |
parent | [media] v4l: Don't warn during link validation when encountering a V4L2 devnode (diff) | |
download | linux-e070f1b47ee9f3591f93a205a3d8b0b06bb0afb5.tar.xz linux-e070f1b47ee9f3591f93a205a3d8b0b06bb0afb5.zip |
[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: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
[prabhakar.lad@ti.com: reword commit message]
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/platform/davinci/vpif_capture.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index fcabc023885d..2d28a96e7775 100644 --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c @@ -1715,7 +1715,7 @@ vpif_enum_dv_timings(struct file *file, void *priv, int ret; ret = v4l2_subdev_call(ch->sd, video, enum_dv_timings, timings); - if (ret == -ENOIOCTLCMD && ret == -ENODEV) + if (ret == -ENOIOCTLCMD || ret == -ENODEV) return -EINVAL; return ret; } @@ -1735,7 +1735,7 @@ vpif_query_dv_timings(struct file *file, void *priv, int ret; ret = v4l2_subdev_call(ch->sd, video, query_dv_timings, timings); - if (ret == -ENOIOCTLCMD && ret == -ENODEV) + if (ret == -ENOIOCTLCMD || ret == -ENODEV) return -ENODATA; return ret; } |