summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-core
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2015-04-14 15:12:54 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-05-20 14:01:46 -0300
commit2a80f296422a01178d0a993479369e94f5830127 (patch)
tree2bb9c1e96dd036f587d487811e33b879eca968dc /drivers/media/dvb-core
parent13b019bbd170d788b1461c2e00b4578a07541dc5 (diff)
downloadlinux-2a80f296422a01178d0a993479369e94f5830127.tar.bz2
[media] dvb-core: fix 32-bit overflow during bandwidth calculation
Frontend bandwidth calculation overflows on very high DVB-S/S2 symbol rates. Use mult_frac() macro in order to keep calculation correct. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/dvb-core')
-rw-r--r--drivers/media/dvb-core/dvb_frontend.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c
index 882ca417f328..a894d4c99ee8 100644
--- a/drivers/media/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb-core/dvb_frontend.c
@@ -2216,7 +2216,7 @@ static int dtv_set_frontend(struct dvb_frontend *fe)
break;
}
if (rolloff)
- c->bandwidth_hz = (c->symbol_rate * rolloff) / 100;
+ c->bandwidth_hz = mult_frac(c->symbol_rate, rolloff, 100);
/* force auto frequency inversion if requested */
if (dvb_force_auto_inversion)