summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2009-03-31 23:49:57 -0500
committerMike Isely <isely@pobox.com>2009-03-31 23:49:57 -0500
commit103979f7c3e7b514b671dc8853ddd47f033c6add (patch)
treedaf67f4da874c6cdaa3e78009722bf0a55298dfa /linux/drivers/media/video
parent40948714693ba8c56716c2931a4caeb6f912e184 (diff)
downloadmediapointer-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.c12
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;