diff options
author | Mike Isely <isely@pobox.com> | 2009-04-01 08:49:57 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-04-07 04:43:51 +0400 |
commit | 5b72d715250bf238af86d76ac527dff8d99b601d (patch) | |
tree | 52757349f5f966f1891b3622e9fedd7587b2732a /drivers | |
parent | f2cf250af156bef127433efd255abfae6aab02f6 (diff) | |
download | linux-5b72d715250bf238af86d76ac527dff8d99b601d.tar.xz |
V4L/DVB (11332): pvrusb2: Fix incorrect reporting of default value for non-integer controls
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-ctrl.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c index 203f54cd18a1..1b992b847198 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c +++ b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c @@ -137,14 +137,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; |