From 14789fc89047665c8086914fbde8eb575a44332c Mon Sep 17 00:00:00 2001 From: Kenneth Aafloy Date: Wed, 14 Jul 2004 14:25:51 +0000 Subject: - Fix integer underflow bug, thanks to Peter Henderson. --- linux/drivers/media/dvb/frontends/mt352.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers/media/dvb/frontends/mt352.c') diff --git a/linux/drivers/media/dvb/frontends/mt352.c b/linux/drivers/media/dvb/frontends/mt352.c index ae5027292..e994f5acd 100644 --- a/linux/drivers/media/dvb/frontends/mt352.c +++ b/linux/drivers/media/dvb/frontends/mt352.c @@ -514,7 +514,7 @@ static int mt352_set_parameters(struct dvb_i2c_bus *i2c, /* here we assume 1/6MHz == 166.66kHz stepsize */ #define IF_FREQUENCYx6 217 /* 6 * 36.16666666667MHz */ - tmp = 6 * freq + IF_FREQUENCYx6; + tmp = ((param->frequency*6)/1000000) + IF_FREQUENCYx6; buf[9] = msb(tmp); /* CHAN_START_(1|0) */ buf[10] = lsb(tmp); -- cgit v1.2.3