diff options
author | Anssi Hannula <anssi.hannula@iki.fi> | 2014-06-09 19:16:43 +0300 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-06-09 21:00:42 +0100 |
commit | c89c7e94bb7d89b39471c79034e3ba1b25d817f5 (patch) | |
tree | 66d54740aadc7a1baf67aba55c843748bf2f6ed8 /MAINTAINERS | |
parent | e9b383dc940f4cba6876887ecb47df3082ec925e (diff) | |
download | linux-c89c7e94bb7d89b39471c79034e3ba1b25d817f5.tar.gz linux-c89c7e94bb7d89b39471c79034e3ba1b25d817f5.tar.bz2 linux-c89c7e94bb7d89b39471c79034e3ba1b25d817f5.zip |
ASoC: fsl_spdif: Fix integer overflow when calculating divisors
The calculation code does
u64 = (u32 - u32) * 100000;
The 64 bits are of no help here as the type is casted only after the
multiplication, and therefore the result may overflow, possibly causing
inoptimal or wrong clock setup in an unfortunate case (the maximum
result value of the first substraction is currently 47999).
Fix the code to cast before multiplication.
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Acked-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'MAINTAINERS')
0 files changed, 0 insertions, 0 deletions