[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>
This commit is contained in:
Antti Palosaari 2015-04-14 15:12:54 -03:00 committed by Mauro Carvalho Chehab
parent 13b019bbd1
commit 2a80f29642
1 changed files with 1 additions and 1 deletions

View File

@ -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)