Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/27447
Change subject: Coverity: Fix CID1393976 ......................................................................
Coverity: Fix CID1393976
Cast to u64 to prevent possible integer overflow.
Change-Id: I5c7d25278db54523242314cba6c85ac2f7a6c1f3 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/soc/cavium/cn81xx/clock.c 1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/47/27447/1
diff --git a/src/soc/cavium/cn81xx/clock.c b/src/soc/cavium/cn81xx/clock.c index bd6514c..02f152f 100644 --- a/src/soc/cavium/cn81xx/clock.c +++ b/src/soc/cavium/cn81xx/clock.c @@ -63,7 +63,7 @@
rst_boot.u = read64((void *)RST_PF_BAR0);
- return rst_boot.s.pnr_mul * PLL_REF_CLK; + return ((u64)rst_boot.s.pnr_mul) * PLL_REF_CLK; }
/** @@ -75,5 +75,5 @@
rst_boot.u = read64((void *)RST_PF_BAR0);
- return rst_boot.s.c_mul * PLL_REF_CLK; + return ((u64)rst_boot.s.c_mul) * PLL_REF_CLK; }