From: Antti Palosaari Date: Tue, 14 Apr 2015 18:12:54 +0000 (-0300) Subject: [media] dvb-core: fix 32-bit overflow during bandwidth calculation X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2a80f296422a01178d0a993479369e94f5830127;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [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 Signed-off-by: Mauro Carvalho Chehab --- 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)