summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2016-05-23 13:45:44 +0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-06-07 19:39:20 +0200
commit1ca830b110cd9d067327571f1136fdbf1ef2b4d3 (patch)
tree2061229b12eec735a5297165fca80405cbdade2b /drivers/media
parentMerge tag 'v4.7-rc2' into v4l_for_linus (diff)
downloadlinux-1ca830b110cd9d067327571f1136fdbf1ef2b4d3.tar.xz
linux-1ca830b110cd9d067327571f1136fdbf1ef2b4d3.zip
[media] v4l2-ioctl: fix stupid mistake in cropcap condition
Fix duplicate tests in condition. The second test for vidioc_cropcap should have tested for vidioc_g_selection instead. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reported-by: David Binderman <linuxdev.baldrick@gmail.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/v4l2-core/v4l2-ioctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index 28e5be2c2eef..528390f33b53 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -2171,7 +2171,7 @@ static int v4l_cropcap(const struct v4l2_ioctl_ops *ops,
* The determine_valid_ioctls() call already should ensure
* that this can never happen, but just in case...
*/
- if (WARN_ON(!ops->vidioc_cropcap && !ops->vidioc_cropcap))
+ if (WARN_ON(!ops->vidioc_cropcap && !ops->vidioc_g_selection))
return -ENOTTY;
if (ops->vidioc_cropcap)