lm32: milkymist-tmu2: fix integer overflow
commit237a8650d640adfb00b65358891fed0e84edfd09
authorMichael Walle <michael@walle.cc>
Wed, 12 Oct 2016 22:35:07 +0000 (13 00:35 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Fri, 28 Oct 2016 15:17:23 +0000 (28 18:17 +0300)
treec3d054c689f94d763608c9377192e76631d8215b
parent19f846b19f4bb5ef187da057d40f0507e3842625
lm32: milkymist-tmu2: fix integer overflow

Don't truncate the multiplication and do a 64 bit one instead because
because the result is stored in a 64 bit variable.

Spotted by coverity, CID 1167561.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/display/milkymist-tmu2.c