diff options
author | Mike Isely <isely@pobox.com> | 2009-03-31 23:49:57 -0500 |
---|---|---|
committer | Mike Isely <isely@pobox.com> | 2009-03-31 23:49:57 -0500 |
commit | 103979f7c3e7b514b671dc8853ddd47f033c6add (patch) | |
tree | daf67f4da874c6cdaa3e78009722bf0a55298dfa /linux/drivers/media/video | |
parent | 40948714693ba8c56716c2931a4caeb6f912e184 (diff) | |
download | mediapointer-dvb-s2-103979f7c3e7b514b671dc8853ddd47f033c6add.tar.gz mediapointer-dvb-s2-103979f7c3e7b514b671dc8853ddd47f033c6add.tar.bz2 |
pvrusb2: Fix incorrect reporting of default value for non-integer controls
From: Mike Isely <isely@pobox.com>
Priority: high
Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/pvrusb2/pvrusb2-ctrl.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-ctrl.c b/linux/drivers/media/video/pvrusb2/pvrusb2-ctrl.c index 5fa8af50b..77360a385 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-ctrl.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-ctrl.c @@ -138,14 +138,12 @@ int pvr2_ctrl_get_min(struct pvr2_ctrl *cptr) int pvr2_ctrl_get_def(struct pvr2_ctrl *cptr, int *valptr) { int ret = 0; - if (!cptr) return 0; + if (!cptr) return -EINVAL; LOCK_TAKE(cptr->hdw->big_lock); do { - if (cptr->info->type == pvr2_ctl_int) { - if (cptr->info->get_def_value) { - ret = cptr->info->get_def_value(cptr, valptr); - } else { - *valptr = cptr->info->default_value; - } + if (cptr->info->get_def_value) { + ret = cptr->info->get_def_value(cptr, valptr); + } else { + *valptr = cptr->info->default_value; } } while(0); LOCK_GIVE(cptr->hdw->big_lock); return ret; |