summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-07-22 00:29:46 +0000
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-22 00:29:46 +0000
commit2bf5145e5bbfe9c7756ba4ccc0d22f4cccdf2ebb (patch)
tree0feda63434f0327215c777c75eea11235a36e240 /linux
parent4588ddfb9948cdad490f96d59ee8a4c2d9be86a2 (diff)
downloadmediapointer-dvb-s2-2bf5145e5bbfe9c7756ba4ccc0d22f4cccdf2ebb.tar.gz
mediapointer-dvb-s2-2bf5145e5bbfe9c7756ba4ccc0d22f4cccdf2ebb.tar.bz2
mt20xx: test below 0 on unsigned lo1a and lo2a
From: roel kluin <roel.kluin@gmail.com> lo1a and lo2a are unsigned ints so these tests won't work. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/common/tuners/mt20xx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/linux/drivers/media/common/tuners/mt20xx.c b/linux/drivers/media/common/tuners/mt20xx.c
index 9d9f1cf11..2669cd0bf 100644
--- a/linux/drivers/media/common/tuners/mt20xx.c
+++ b/linux/drivers/media/common/tuners/mt20xx.c
@@ -149,7 +149,8 @@ static int mt2032_compute_freq(struct dvb_frontend *fe,
tuner_dbg("mt2032: rfin=%d lo2=%d lo2n=%d lo2a=%d num=%d lo2freq=%d\n",
rfin,lo2,lo2n,lo2a,lo2num,lo2freq);
- if(lo1a<0 || lo1a>7 || lo1n<17 ||lo1n>48 || lo2a<0 ||lo2a >7 ||lo2n<17 || lo2n>30) {
+ if (lo1a > 7 || lo1n < 17 || lo1n > 48 || lo2a > 7 || lo2n < 17 ||
+ lo2n > 30) {
tuner_info("mt2032: frequency parameters out of range: %d %d %d %d\n",
lo1a, lo1n, lo2a,lo2n);
return(-1);