Commit ed300132 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

Staging: cx25821: off by one in cx25821_enum_input()

The INPUT(n) macro indexes an array of size 2.
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7a02f549
...@@ -876,7 +876,7 @@ int cx25821_enum_input(struct cx25821_dev *dev, struct v4l2_input *i) ...@@ -876,7 +876,7 @@ int cx25821_enum_input(struct cx25821_dev *dev, struct v4l2_input *i)
dprintk(1, "%s()\n", __func__); dprintk(1, "%s()\n", __func__);
n = i->index; n = i->index;
if (n > 2) if (n >= 2)
return -EINVAL; return -EINVAL;
if (0 == INPUT(n)->type) if (0 == INPUT(n)->type)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment