aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/pci/bt8xx/bttv-driver.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c
index b36d67577535..6e61dbdd95c3 100644
--- a/drivers/media/pci/bt8xx/bttv-driver.c
+++ b/drivers/media/pci/bt8xx/bttv-driver.c
@@ -1923,7 +1923,7 @@ static int bttv_enum_input(struct file *file, void *priv,
1923 } 1923 }
1924 1924
1925 i->type = V4L2_INPUT_TYPE_CAMERA; 1925 i->type = V4L2_INPUT_TYPE_CAMERA;
1926 i->audioset = 1; 1926 i->audioset = 0;
1927 1927
1928 if (btv->tuner_type != TUNER_ABSENT && i->index == 0) { 1928 if (btv->tuner_type != TUNER_ABSENT && i->index == 0) {
1929 sprintf(i->name, "Television"); 1929 sprintf(i->name, "Television");
@@ -1964,21 +1964,16 @@ static int bttv_s_input(struct file *file, void *priv, unsigned int i)
1964{ 1964{
1965 struct bttv_fh *fh = priv; 1965 struct bttv_fh *fh = priv;
1966 struct bttv *btv = fh->btv; 1966 struct bttv *btv = fh->btv;
1967
1968 int err; 1967 int err;
1969 1968
1970 err = v4l2_prio_check(&btv->prio, fh->prio); 1969 err = v4l2_prio_check(&btv->prio, fh->prio);
1971 if (unlikely(err)) 1970 if (err)
1972 goto err; 1971 return err;
1973 1972
1974 if (i > bttv_tvcards[btv->c.type].video_inputs) { 1973 if (i >= bttv_tvcards[btv->c.type].video_inputs)
1975 err = -EINVAL; 1974 return -EINVAL;
1976 goto err;
1977 }
1978 1975
1979 set_input(btv, i, btv->tvnorm); 1976 set_input(btv, i, btv->tvnorm);
1980
1981err:
1982 return 0; 1977 return 0;
1983} 1978}
1984 1979