aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-stm32.c
diff options
context:
space:
mode:
authorUwe Kleine-König <[email protected]>2025-04-01 10:29:01 +0000
committerUwe Kleine-König <[email protected]>2025-04-04 07:23:56 +0000
commit928446a5302eee30ebb32075c0db5dda5a138fb7 (patch)
tree234c1797f7f0b5bfdcb7028cd8217d8a280f9a3c /drivers/pwm/pwm-stm32.c
parentpwm: rcar: Improve register calculation (diff)
downloadkernel-928446a5302eee30ebb32075c0db5dda5a138fb7.tar.gz
kernel-928446a5302eee30ebb32075c0db5dda5a138fb7.zip
pwm: fsl-ftm: Handle clk_get_rate() returning 0
Considering that the driver doesn't enable the used clocks (and also that clk_get_rate() returns 0 if CONFIG_HAVE_CLK is unset) better check the return value of clk_get_rate() for being non-zero before dividing by it. Fixes: 3479bbd1e1f8 ("pwm: fsl-ftm: More relaxed permissions for updating period") Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/b68351a51017035651bc62ad3146afcb706874f0.1743501688.git.u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König <[email protected]>
Diffstat (limited to 'drivers/pwm/pwm-stm32.c')
0 files changed, 0 insertions, 0 deletions