Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1344984 > unrolled thread

[patch 1/2] [media] tvp5150: off by one

Started byDan Carpenter <dan.carpenter@oracle.com>
First post2016-02-27 12:00 +0100
Last post2016-02-28 15:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [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

#1344984 — [patch 1/2] [media] tvp5150: off by one

FromDan Carpenter <dan.carpenter@oracle.com>
Date2016-02-27 12:00 +0100
Subject[patch 1/2] [media] tvp5150: off by one
Message-ID<r6KLn-1EZ-3@gated-at.bofh.it>
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;
 		}

[toc] | [next] | [standalone]


#1345290

FromJavier Martinez Canillas <javier@osg.samsung.com>
Date2016-02-28 15:50 +0100
Message-ID<r7aPw-3VM-5@gated-at.bofh.it>
In reply to#1344984
Hello Dan,

On 02/27/2016 07:51 AM, Dan Carpenter wrote:
> 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>
>

Thanks for the patch but Mauro already posted the same change before:

http://www.spinics.net/lists/linux-media/msg97721.html

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web