Skip to content

Commit

Permalink
V4L/DVB (13523): dvb-bt8xx: fix compile warning
Browse files Browse the repository at this point in the history
Fix this compile warning:

v4l/dvb-bt8xx.c: In function 'cx24108_tuner_set_params':
v4l/dvb-bt8xx.c:221: warning: array subscript is above array bounds

Make sure that we never get past the last element in the array.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Dec 5, 2009
1 parent 289a774 commit 491aa96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/dvb/bt8xx/dvb-bt8xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ static int cx24108_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend
freq = 2150000; /* satellite IF is 950..2150MHz */

/* decide which VCO to use for the input frequency */
for(i = 1; (i < ARRAY_SIZE(osci)) && (osci[i] < freq); i++);
for(i = 1; (i < ARRAY_SIZE(osci) - 1) && (osci[i] < freq); i++);
printk("cx24108 debug: select vco #%d (f=%d)\n",i,freq);
band=bandsel[i];
/* the gain values must be set by SetSymbolrate */
Expand Down

0 comments on commit 491aa96

Please sign in to comment.