* [PATCH for 4.7] v4l2-ioctl: fix stupid mistake in cropcap condition
@ 2016-05-23 11:45 Hans Verkuil
2016-05-24 15:08 ` Sakari Ailus
0 siblings, 1 reply; 2+ messages in thread
From: Hans Verkuil @ 2016-05-23 11:45 UTC (permalink / raw)
To: Linux Media Mailing List; +Cc: David Binderman
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>
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index 28e5be2..528390f 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)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH for 4.7] v4l2-ioctl: fix stupid mistake in cropcap condition
2016-05-23 11:45 [PATCH for 4.7] v4l2-ioctl: fix stupid mistake in cropcap condition Hans Verkuil
@ 2016-05-24 15:08 ` Sakari Ailus
0 siblings, 0 replies; 2+ messages in thread
From: Sakari Ailus @ 2016-05-24 15:08 UTC (permalink / raw)
To: Hans Verkuil; +Cc: Linux Media Mailing List, David Binderman
On Mon, May 23, 2016 at 01:45:44PM +0200, Hans Verkuil wrote:
> 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>
--
Sakari Ailus
e-mail: sakari.ailus@iki.fi XMPP: sailus@retiisi.org.uk
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-05-24 15:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-23 11:45 [PATCH for 4.7] v4l2-ioctl: fix stupid mistake in cropcap condition Hans Verkuil
2016-05-24 15:08 ` Sakari Ailus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).