diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2016-05-23 07:45:44 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-06-07 13:39:20 -0400 |
commit | 1ca830b110cd9d067327571f1136fdbf1ef2b4d3 (patch) | |
tree | 2061229b12eec735a5297165fca80405cbdade2b | |
parent | c853f18b640f3e58ba14ffb25e551be8af218209 (diff) |
[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>
-rw-r--r-- | drivers/media/v4l2-core/v4l2-ioctl.c | 2 |
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, | |||
2171 | * The determine_valid_ioctls() call already should ensure | 2171 | * The determine_valid_ioctls() call already should ensure |
2172 | * that this can never happen, but just in case... | 2172 | * that this can never happen, but just in case... |
2173 | */ | 2173 | */ |
2174 | if (WARN_ON(!ops->vidioc_cropcap && !ops->vidioc_cropcap)) | 2174 | if (WARN_ON(!ops->vidioc_cropcap && !ops->vidioc_g_selection)) |
2175 | return -ENOTTY; | 2175 | return -ENOTTY; |
2176 | 2176 | ||
2177 | if (ops->vidioc_cropcap) | 2177 | if (ops->vidioc_cropcap) |