diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-10-30 08:49:38 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-11-22 09:20:13 -0500 |
commit | 63af4af59238fc17e70d0b0046362c804d4fc567 (patch) | |
tree | 38ca7089f302c0bf6128771f399cf093a26d2c80 /drivers/media | |
parent | e070f1b47ee9f3591f93a205a3d8b0b06bb0afb5 (diff) |
[media] davinci: vpif_display: 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 messaage]
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/davinci/vpif_display.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c index b716fbd4241..977ee436c33 100644 --- a/drivers/media/platform/davinci/vpif_display.c +++ b/drivers/media/platform/davinci/vpif_display.c | |||
@@ -1380,7 +1380,7 @@ vpif_enum_dv_timings(struct file *file, void *priv, | |||
1380 | int ret; | 1380 | int ret; |
1381 | 1381 | ||
1382 | ret = v4l2_subdev_call(ch->sd, video, enum_dv_timings, timings); | 1382 | ret = v4l2_subdev_call(ch->sd, video, enum_dv_timings, timings); |
1383 | if (ret == -ENOIOCTLCMD && ret == -ENODEV) | 1383 | if (ret == -ENOIOCTLCMD || ret == -ENODEV) |
1384 | return -EINVAL; | 1384 | return -EINVAL; |
1385 | return ret; | 1385 | return ret; |
1386 | } | 1386 | } |