* [PATCH 8/9] mt20xx: test below 0 on unsigned lo1a and lo2a
@ 2008-07-22 0:29 roel kluin
0 siblings, 0 replies; only message in thread
From: roel kluin @ 2008-07-22 0:29 UTC (permalink / raw)
To: mchehab, video4linux-list; +Cc: linux-kernel
lo1a and lo2a are unsigned ints so these tests won't work.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/media/common/tuners/mt20xx.c b/drivers/media/common/tuners/mt20xx.c
index fbcb282..35b763a 100644
--- a/drivers/media/common/tuners/mt20xx.c
+++ b/drivers/media/common/tuners/mt20xx.c
@@ -148,7 +148,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);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-07-22 0:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-22 0:29 [PATCH 8/9] mt20xx: test below 0 on unsigned lo1a and lo2a roel kluin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.