diff options
author | Mike Isely <isely@pobox.com> | 2007-01-19 21:30:23 -0600 |
---|---|---|
committer | Mike Isely <isely@pobox.com> | 2007-01-19 21:30:23 -0600 |
commit | feed15939f4b35e6280df65e4c223aaef5cc3c2e (patch) | |
tree | f326deefc1b646727280fda7c209fc51d0a61ac3 | |
parent | c04a9a3e4d34ce866a1ff2e391b5e89215060be7 (diff) | |
download | mediapointer-dvb-s2-feed15939f4b35e6280df65e4c223aaef5cc3c2e.tar.gz mediapointer-dvb-s2-feed15939f4b35e6280df65e4c223aaef5cc3c2e.tar.bz2 |
pvrusb2: V4L EXT_CTRLS fixup
From: Mike Isely <isely@pobox.com>
Attempts to enumerate or operate on a group of EXT_CTRLS where the
group size is zero is OK; don't fail on such operations. At least one
application uses this to probe for the existence of this API so let it
succeed.
Signed-off-by: Mike Isely <isely@pobox.com>
-rw-r--r-- | linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c index c27933665..3255de151 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c @@ -637,6 +637,7 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file, struct v4l2_ext_control *ctrl; unsigned int idx; int val; + ret = 0; for (idx = 0; idx < ctls->count; idx++) { ctrl = ctls->controls + idx; ret = pvr2_ctrl_get_value( @@ -659,6 +660,7 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file, (struct v4l2_ext_controls *)arg; struct v4l2_ext_control *ctrl; unsigned int idx; + ret = 0; for (idx = 0; idx < ctls->count; idx++) { ctrl = ctls->controls + idx; ret = pvr2_ctrl_set_value( @@ -681,6 +683,7 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file, unsigned int idx; /* For the moment just validate that the requested control actually exists. */ + ret = 0; for (idx = 0; idx < ctls->count; idx++) { ctrl = ctls->controls + idx; pctl = pvr2_hdw_get_ctrl_v4l(hdw,ctrl->id); |