public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* weird array index in zl10036.c
@ 2009-12-27 13:15 Dan Carpenter
  2009-12-27 17:02 ` Matthias Schwarzott
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2009-12-27 13:15 UTC (permalink / raw)
  To: linux-media; +Cc: Matthias Schwarzott, Mauro Carvalho Chehab

drivers/media/dvb/frontends/zl10036.c
   397          /* could also be one block from reg 2 to 13 and additional 10/11 */
   398          u8 zl10036_init_tab[][2] = {
   399                  { 0x04, 0x00 },         /*   2/3: div=0x400 - arbitrary value */
   400                  { 0x8b, _RDIV_REG },    /*   4/5: rfg=0 ba=1 bg=1 len=? */
   401                                          /*        p0=0 c=0 r=_RDIV_REG */
   402                  { 0xc0, 0x20 },         /*   6/7: rsd=0 bf=0x10 */
   403                  { 0xd3, 0x40 },         /*   8/9: from datasheet */
   404                  { 0xe3, 0x5b },         /* 10/11: lock window level */
   405                  { 0xf0, 0x28 },         /* 12/13: br=0xa clr=0 tl=0*/
   406                  { 0xe3, 0xf9 },         /* 10/11: unlock window level */
   407          };
   408
   409          /* invalid values to trigger writing */
   410          state->br = 0xff;
   411          state->bf = 0xff;
   412
   413          if (!state->config->rf_loop_enable)
   414                  zl10036_init_tab[1][2] |= 0x01;
 
This seems like an off by one error.  I think it maybe should say
zl10036_init_tab[1][1] |= 0x01;?

regards,
dan carpenter

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

end of thread, other threads:[~2009-12-29 10:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-27 13:15 weird array index in zl10036.c Dan Carpenter
2009-12-27 17:02 ` Matthias Schwarzott
2009-12-28 17:48   ` [patch] fix " Dan Carpenter
2009-12-29 10:08     ` Matthias Schwarzott

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