diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c index ef393f5daf2ae054a15ec37c3ddb93afe153d78e..ff18444e19e4828418e5ec6cf75747b19dc5c4f5 100644 --- a/drivers/media/i2c/tvp5150.c +++ b/drivers/media/i2c/tvp5150.c @@ -1386,7 +1386,7 @@ static int tvp5150_parse_dt(struct tvp5150 *decoder, struct device_node *np) goto err_connector; } - if (input_type > TVP5150_INPUT_NUM) { + if (input_type >= TVP5150_INPUT_NUM) { ret = -EINVAL; goto err_connector; }