diff options
author | Dan Carpenter <error27@gmail.com> | 2009-12-28 19:00:24 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-03 16:42:38 -0800 |
commit | ed30013207ef3e36da4f39db1298ae53f799e29c (patch) | |
tree | e27b869b3904735c0639c265c259d64a8633afa5 | |
parent | 7a02f549fcc30fe6be0c0024beae9a3db22e1af6 (diff) |
Staging: cx25821: off by one in cx25821_enum_input()
The INPUT(n) macro indexes an array of size 2.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/cx25821/cx25821-video.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/cx25821/cx25821-video.c b/drivers/staging/cx25821/cx25821-video.c index c7c14c7698a..6e710ae067a 100644 --- a/drivers/staging/cx25821/cx25821-video.c +++ b/drivers/staging/cx25821/cx25821-video.c @@ -876,7 +876,7 @@ int cx25821_enum_input(struct cx25821_dev *dev, struct v4l2_input *i) dprintk(1, "%s()\n", __func__); n = i->index; - if (n > 2) + if (n >= 2) return -EINVAL; if (0 == INPUT(n)->type) |