From: Dan Carpenter <error27@xxxxxxxxx> The "AUVI_INPUT(tmp)" macro uses "tmp" as an index of an array with AU0828_MAX_INPUT elements. Signed-off-by: Dan Carpenter <error27@xxxxxxxxx> Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx> Cc: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> Cc: Hans Verkuil <hverkuil@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/media/video/au0828/au0828-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/media/video/au0828/au0828-video.c~drivers-media-video-au0828-au0828-videoc-off-by-one-bug drivers/media/video/au0828/au0828-video.c --- a/drivers/media/video/au0828/au0828-video.c~drivers-media-video-au0828-au0828-videoc-off-by-one-bug +++ a/drivers/media/video/au0828/au0828-video.c @@ -1105,7 +1105,7 @@ static int vidioc_enum_input(struct file tmp = input->index; - if (tmp > AU0828_MAX_INPUT) + if (tmp >= AU0828_MAX_INPUT) return -EINVAL; if (AUVI_INPUT(tmp).type == 0) return -EINVAL; _ -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html