diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2008-04-01 16:49:13 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-01 18:35:45 -0400 |
commit | 1a002ebf60c011ed6574b8e3ed9aa85f1ead6a95 (patch) | |
tree | ede91daf700a989446a072124f11eb837e83d666 /drivers | |
parent | c137918978889fa4711d286e0a8ca3d93fdcb991 (diff) |
V4L/DVB (7461): bttv: fix missed index check
We should check for proper index first
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/bt8xx/bttv-driver.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index e68326f28097..fcf8f2d208a8 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c | |||
@@ -3518,8 +3518,12 @@ static int radio_enum_input(struct file *file, void *priv, | |||
3518 | static int radio_g_audio(struct file *file, void *priv, | 3518 | static int radio_g_audio(struct file *file, void *priv, |
3519 | struct v4l2_audio *a) | 3519 | struct v4l2_audio *a) |
3520 | { | 3520 | { |
3521 | if (a->index != 0) | ||
3522 | return -EINVAL; | ||
3523 | |||
3521 | memset(a, 0, sizeof(*a)); | 3524 | memset(a, 0, sizeof(*a)); |
3522 | strcpy(a->name, "Radio"); | 3525 | strcpy(a->name, "Radio"); |
3526 | |||
3523 | return 0; | 3527 | return 0; |
3524 | } | 3528 | } |
3525 | 3529 | ||