Skip to content
Commit 05bed1c6 authored by Baohong Liu's avatar Baohong Liu Committed by Anas Nashif
Browse files

drivers: pwm_qmsi: add type cast to prevent overflow



Add type cast to prevent overflow.

In the pwm driver function pwm_qmsi_get_cycles_per_sec(),
there is a multiplication which takes ticks_per_us (32 bit
unsigned integer) and USEC_PER_SEC. Practically, overflow
will not happen, since the sys clock is not that high. But,
it can trigger an overflow alarm by automatic tools.

Change-Id: I67e6f6a4763e62f6674fcdd364880d93829e739e
Signed-off-by: default avatarBaohong Liu <baohong.liu@intel.com>
parent 9d89fa5e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment