summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2006-04-20 00:25:13 -0500
committerMike Isely <isely@pobox.com>2006-04-20 00:25:13 -0500
commit2e8bea8ec6176e6319293615bdd4a0fce038d561 (patch)
tree9768f3616292ac74e811abed2b2a43ac4c635476 /linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
parent322a72b2cfc8911cfb40781716197551ff3e4504 (diff)
downloadmediapointer-dvb-s2-2e8bea8ec6176e6319293615bdd4a0fce038d561.tar.gz
mediapointer-dvb-s2-2e8bea8ec6176e6319293615bdd4a0fce038d561.tar.bz2
Fix off-by-1 problem in pvrusb2 video standard enumeration
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c')
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index 8da06d216..897f547e5 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -1944,9 +1944,9 @@ int pvr2_hdw_get_stdenum_value(struct pvr2_hdw *hdw,
{
int ret = -EINVAL;
if (!idx) return ret;
- idx--;
LOCK_TAKE(hdw->big_lock); do {
if (idx >= hdw->std_enum_cnt) break;
+ idx--;
memcpy(std,hdw->std_defs+idx,sizeof(*std));
ret = 0;
} while (0); LOCK_GIVE(hdw->big_lock);