diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-04-13 06:39:19 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-04-16 17:02:23 -0400 |
commit | 6b1dce251fa21caea4e0021fd3fd0d8dcdece784 (patch) | |
tree | c2c4865afb070de8d74d0b44ebc594275231348b /drivers/media/pci/cx25821 | |
parent | a8f35ce3d6f5b776463f03403e0319c2415401f7 (diff) |
[media] cx25821: s_input didn't check for invalid input
The s_input implementation allowed input 1 even if that didn't exist.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/pci/cx25821')
-rw-r--r-- | drivers/media/pci/cx25821/cx25821-video.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/pci/cx25821/cx25821-video.c b/drivers/media/pci/cx25821/cx25821-video.c index a9aa09651cab..9ddc7ac03a73 100644 --- a/drivers/media/pci/cx25821/cx25821-video.c +++ b/drivers/media/pci/cx25821/cx25821-video.c | |||
@@ -1163,10 +1163,8 @@ int cx25821_vidioc_s_input(struct file *file, void *priv, unsigned int i) | |||
1163 | return err; | 1163 | return err; |
1164 | } | 1164 | } |
1165 | 1165 | ||
1166 | if (i >= CX25821_NR_INPUT) { | 1166 | if (i >= CX25821_NR_INPUT || INPUT(i)->type == 0) |
1167 | dprintk(1, "%s(): -EINVAL\n", __func__); | ||
1168 | return -EINVAL; | 1167 | return -EINVAL; |
1169 | } | ||
1170 | 1168 | ||
1171 | mutex_lock(&dev->lock); | 1169 | mutex_lock(&dev->lock); |
1172 | cx25821_video_mux(dev, i); | 1170 | cx25821_video_mux(dev, i); |