diff options
author | George Stark <gnstark@salutedevices.com> | 2024-04-25 19:12:53 +0200 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2024-04-30 18:57:09 +0200 |
commit | 32c44e1fa921aebf8a5ef9f778534a30aab39313 (patch) | |
tree | fc2b9a15276f5798c800d624d147f58175c6fa24 /drivers/pwm/pwm-ntxec.c | |
parent | pwm: meson: Add check for error from clk_round_rate() (diff) | |
download | linux-32c44e1fa921aebf8a5ef9f778534a30aab39313.tar.xz linux-32c44e1fa921aebf8a5ef9f778534a30aab39313.zip |
pwm: meson: Use mul_u64_u64_div_u64() for frequency calculating
While calculating frequency for the given period u64 numbers are
multiplied before division what can lead to overflow in theory so use
secure mul_u64_u64_div_u64() which handles overflow correctly.
Fixes: 329db102a26d ("pwm: meson: make full use of common clock framework")
Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: George Stark <gnstark@salutedevices.com>
Link: https://lore.kernel.org/r/20240425171253.2752877-4-gnstark@salutedevices.com
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'drivers/pwm/pwm-ntxec.c')
0 files changed, 0 insertions, 0 deletions