The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: mkrufky@linuxtv.org
To: bunk@kernel.org
Cc: mchehab@infradead.org, v4l-dvb-maintainer@linuxtv.org,
	linux-kernel@vger.kernel.org
Subject: Re: [2.6 patch] dvb/frontends/tda18271-common.c: fix off-by-one
Date: Mon, 28 Jan 2008 17:14:16 -0500	[thread overview]
Message-ID: <479E53B8.6030505@linuxtv.org> (raw)
In-Reply-To: <20080128221241.GG8767@does.not.exist>

Adrian Bunk wrote:
> This patch fixes an off-by-one error spotted by the Coverity checker.
>
> Signed-off-by: Adrian Bunk <bunk@kernel.org>
>   
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>

Thank you, Adrian.

Mauro, please merge this and queue for upstream.

Cheers,

Mike


> ---
> --- linux-2.6/drivers/media/dvb/frontends/tda18271-common.c.old
2008-01-28 16:27:55.000000000 +0200
> +++ linux-2.6/drivers/media/dvb/frontends/tda18271-common.c	2008-01-28
16:28:38.000000000 +0200
> @@ -166,17 +166,17 @@ int tda18271_read_extended(struct dvb_fr
>  	/* read all registers */
>  	ret = i2c_transfer(priv->i2c_adap, msg, 2);
>  
>  	tda18271_i2c_gate_ctrl(fe, 0);
>  
>  	if (ret != 2)
>  		tda_err("ERROR: i2c_transfer returned: %d\n", ret);
>  
> -	for (i = 0; i <= TDA18271_NUM_REGS; i++) {
> +	for (i = 0; i < TDA18271_NUM_REGS; i++) {
>  		/* don't update write-only registers */
>  		if ((i != R_EB9)  &&
>  		    (i != R_EB16) &&
>  		    (i != R_EB17) &&
>  		    (i != R_EB19) &&
>  		    (i != R_EB20))
>  		regs[i] = regdump[i];
>  	}
>
>   


      reply	other threads:[~2008-01-28 22:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-28 22:12 [2.6 patch] dvb/frontends/tda18271-common.c: fix off-by-one Adrian Bunk
2008-01-28 22:14 ` mkrufky [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=479E53B8.6030505@linuxtv.org \
    --to=mkrufky@linuxtv.org \
    --cc=bunk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=v4l-dvb-maintainer@linuxtv.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox