1
0
Fork 0

LF-1512: drm: cdns mhdp: avoid potentially overflowing

covert to unsigned 64 bits to avoid potentially overflowing.
Report by Coverity ID 6652952 6652952.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Reviewed-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 045dd5dd936eb7cd40fb2b9fb0c8f230aa3370fe)
5.4-rM2-2.2.x-imx-squashed
Sandor Yu 2020-06-19 16:05:42 +08:00
parent 0455d4ae8e
commit 74b4d5e5b4
1 changed files with 1 additions and 1 deletions

View File

@ -823,7 +823,7 @@ int cdns_mhdp_config_video(struct cdns_mhdp_device *mhdp)
*/
do {
tu_size_reg += 2;
symbol = tu_size_reg * mode->clock * bit_per_pix;
symbol = (u64) tu_size_reg * mode->clock * bit_per_pix;
do_div(symbol, mhdp->dp.link.num_lanes * link_rate * 8);
rem = do_div(symbol, 1000);
if (tu_size_reg > 64) {