summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-11-25 22:48:54 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-05 21:42:15 +0100
commit491aa96a8c37260d2466735ecd3c662db8c0a7af (patch)
tree23c31261cb9f4bc2c8d95a4610523b3d29139f73 /drivers/media
parentV4L/DVB (13522): valj5jf8007s/t: fix compile warnings (diff)
downloadlinux-491aa96a8c37260d2466735ecd3c662db8c0a7af.tar.xz
linux-491aa96a8c37260d2466735ecd3c662db8c0a7af.zip
V4L/DVB (13523): dvb-bt8xx: fix compile warning
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>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb/bt8xx/dvb-bt8xx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/drivers/media/dvb/bt8xx/dvb-bt8xx.c
index b1857c19bbd2..78fc469f0f69 100644
--- a/drivers/media/dvb/bt8xx/dvb-bt8xx.c
+++ b/drivers/media/dvb/bt8xx/dvb-bt8xx.c
@@ -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 */