MLK-20201 clk: imx: Fix coverity issue of CID 17326/17327
authorAnson Huang <Anson.Huang@nxp.com>
Wed, 19 Dec 2018 06:22:09 +0000 (14:22 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Thu, 2 May 2019 08:35:28 +0000 (11:35 +0300)
commite7028f6b720c80b8594adbe59d584b8883bee083
tree0b9da6458a0c20befc7397fd08503aaf46f4a0ab
parent528ed1bf9667716fcb5ee3eb356e4564b7032308
MLK-20201 clk: imx: Fix coverity issue of CID 17326/17327

This patch fixes below coverity issues:

CID 17326/17327: Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
overflow_before_widen: Potentially overflowing expression div *
parent_rate with type unsigned long (32 bits, unsigned) is evaluated
using 32-bit arithmetic, and then used in a context that expects an
expression of type u64 (64 bits, unsigned).

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com>
(cherry picked from commit 4bb630c8543c9346a0c21b4e42ad3949e7c6185d)
drivers/clk/imx/clk-pllv3.c