Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1344984
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [patch 1/2] [media] tvp5150: off by one |
| Date | 2016-02-27 12:00 +0100 |
| Message-ID | <r6KLn-1EZ-3@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
The ->input_ent[] array has TVP5150_INPUT_NUM elements so the > here
should be >=.
Fixes: f7b4b54e6364 ('[media] tvp5150: add HW input connectors support')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c
index ef393f5..ff18444 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;
}
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[patch 1/2] [media] tvp5150: off by one Dan Carpenter <dan.carpenter@oracle.com> - 2016-02-27 12:00 +0100 Re: [patch 1/2] [media] tvp5150: off by one Javier Martinez Canillas <javier@osg.samsung.com> - 2016-02-28 15:50 +0100
csiph-web