v4l2-ioctl: fix stupid mistake in cropcap condition
PATCH 1/1 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 <[email protected]>
Reported-by David Binderman <[email protected]>
drivers/media/v4l2-core/v4l2-ioctl.c +1 -1
@@ -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)
Quoted 5 lines · Hans Verkuil
Fix duplicate tests in condition. The second test for
vidioc_cropcapshould have tested forvidioc_g_selectioninstead.Signed-off-by Hans Verkuil <[email protected]>Reported-by David Binderman <[email protected]>
Acked-by Sakari Ailus <[email protected]>
Signature · 2 lines
Sakari Ailus e-mail: [email protected] XMPP: [email protected]