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>
This commit is contained in:
parent
7a02f549fc
commit
ed30013207
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user