public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* smatch report: cx231xx: incorrect check in cx231xx_write_i2c_data()
@ 2010-12-23 16:43 Dan Carpenter
  2010-12-23 18:34 ` Andy Walls
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2010-12-23 16:43 UTC (permalink / raw)
  To: Srinivasa.Deevi; +Cc: linux-media

Hi,

I was doing an audit and I came across this.

drivers/media/video/cx231xx/cx231xx-core.c +1644 cx231xx_write_i2c_data(14)
	warn: 'saddr_len' is non-zero. Did you mean 'saddr'

  1642          if (saddr_len == 0)
  1643                  saddr = 0;
  1644          else if (saddr_len == 0)
  1645                  saddr &= 0xff;

We check "saddr_len == 0" twice which doesn't make sense.  I'm not sure
what the correct fix is though.  It's been this way since the driver was
merged.

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-12-23 19:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-23 16:43 smatch report: cx231xx: incorrect check in cx231xx_write_i2c_data() Dan Carpenter
2010-12-23 18:34 ` Andy Walls
2010-12-23 18:55   ` Dan Carpenter
     [not found]   ` <34B38BE41EDBA046A4AFBB591FA311320249B057C6@NBMBX01.bbnet.ad>
2010-12-23 19:38     ` [patch] [media] cx231xxx: fix typo in saddr_len check Dan Carpenter
2010-12-23 19:40       ` Sri Deevi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox