diff options
Diffstat (limited to 'drivers/media/video/bt8xx/bttv-driver.c')
-rw-r--r-- | drivers/media/video/bt8xx/bttv-driver.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index af2c0c994186..79da9d01d715 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c | |||
@@ -3117,12 +3117,18 @@ static int bttv_s_crop(struct file *file, void *f, struct v4l2_crop *crop) | |||
3117 | 3117 | ||
3118 | static int bttv_g_audio(struct file *file, void *priv, struct v4l2_audio *a) | 3118 | static int bttv_g_audio(struct file *file, void *priv, struct v4l2_audio *a) |
3119 | { | 3119 | { |
3120 | if (unlikely(a->index)) | ||
3121 | return -EINVAL; | ||
3122 | |||
3120 | strcpy(a->name, "audio"); | 3123 | strcpy(a->name, "audio"); |
3121 | return 0; | 3124 | return 0; |
3122 | } | 3125 | } |
3123 | 3126 | ||
3124 | static int bttv_s_audio(struct file *file, void *priv, struct v4l2_audio *a) | 3127 | static int bttv_s_audio(struct file *file, void *priv, struct v4l2_audio *a) |
3125 | { | 3128 | { |
3129 | if (unlikely(a->index)) | ||
3130 | return -EINVAL; | ||
3131 | |||
3126 | return 0; | 3132 | return 0; |
3127 | } | 3133 | } |
3128 | 3134 | ||
@@ -3510,7 +3516,7 @@ static int radio_enum_input(struct file *file, void *priv, | |||
3510 | return -EINVAL; | 3516 | return -EINVAL; |
3511 | 3517 | ||
3512 | strcpy(i->name, "Radio"); | 3518 | strcpy(i->name, "Radio"); |
3513 | i->type = V4L2_INPUT_TYPE_TUNER; | 3519 | i->type = V4L2_INPUT_TYPE_TUNER; |
3514 | 3520 | ||
3515 | return 0; | 3521 | return 0; |
3516 | } | 3522 | } |
@@ -3518,10 +3524,9 @@ static int radio_enum_input(struct file *file, void *priv, | |||
3518 | static int radio_g_audio(struct file *file, void *priv, | 3524 | static int radio_g_audio(struct file *file, void *priv, |
3519 | struct v4l2_audio *a) | 3525 | struct v4l2_audio *a) |
3520 | { | 3526 | { |
3521 | if (a->index != 0) | 3527 | if (unlikely(a->index)) |
3522 | return -EINVAL; | 3528 | return -EINVAL; |
3523 | 3529 | ||
3524 | memset(a, 0, sizeof(*a)); | ||
3525 | strcpy(a->name, "Radio"); | 3530 | strcpy(a->name, "Radio"); |
3526 | 3531 | ||
3527 | return 0; | 3532 | return 0; |
@@ -3543,11 +3548,17 @@ static int radio_s_tuner(struct file *file, void *priv, | |||
3543 | static int radio_s_audio(struct file *file, void *priv, | 3548 | static int radio_s_audio(struct file *file, void *priv, |
3544 | struct v4l2_audio *a) | 3549 | struct v4l2_audio *a) |
3545 | { | 3550 | { |
3551 | if (unlikely(a->index)) | ||
3552 | return -EINVAL; | ||
3553 | |||
3546 | return 0; | 3554 | return 0; |
3547 | } | 3555 | } |
3548 | 3556 | ||
3549 | static int radio_s_input(struct file *filp, void *priv, unsigned int i) | 3557 | static int radio_s_input(struct file *filp, void *priv, unsigned int i) |
3550 | { | 3558 | { |
3559 | if (unlikely(i)) | ||
3560 | return -EINVAL; | ||
3561 | |||
3551 | return 0; | 3562 | return 0; |
3552 | } | 3563 | } |
3553 | 3564 | ||