linux-yocto/drivers/pwm
Uwe Kleine-König 0e1816d8c2 pwm: fsl-ftm: Handle clk_get_rate() returning 0
[ Upstream commit 928446a530 ]

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: 3479bbd1e1 ("pwm: fsl-ftm: More relaxed permissions for updating period")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/b68351a51017035651bc62ad3146afcb706874f0.1743501688.git.u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-04-25 10:45:21 +02:00
..
core.c pwm: Rename pwm_apply_state() to pwm_apply_might_sleep() 2024-06-12 11:12:24 +02:00
Kconfig mfd: rz-mtu3: Link time dependencies 2023-08-18 21:48:04 +01:00
Makefile pwm: Add Renesas RZ/G2L MTU3a PWM driver 2023-06-23 15:46:29 +02:00
pwm-ab8500.c pwm: ab8500: Fix error code in probe() 2023-06-23 15:43:49 +02:00
pwm-apple.c pwm: Explicitly include correct DT includes 2023-07-24 13:28:05 +02:00
pwm-atmel-hlcdc.c pwm: atmel-hlcdc: Fix clock imbalance related to suspend support 2024-03-26 18:19:26 -04:00
pwm-atmel-tcb.c pwm: atmel-tcb: Fix race condition and convert to guards 2024-08-03 08:53:23 +02:00
pwm-atmel.c pwm: atmel: Simplify using devm functions 2023-07-28 10:15:44 +02:00
pwm-bcm-iproc.c
pwm-bcm-kona.c pwm: bcm-kona: Consistently name pwm_chip variables "chip" 2023-07-21 20:23:31 +02:00
pwm-bcm2835.c
pwm-berlin.c pwm: Explicitly include correct DT includes 2023-07-24 13:28:05 +02:00
pwm-brcmstb.c pwm: brcmstb: Utilize appropriate clock APIs in suspend/resume 2023-11-20 11:59:34 +01:00
pwm-clk.c pwm: clk: Use the devm_clk_get_prepared() helper function 2023-06-23 15:34:33 +02:00
pwm-clps711x.c
pwm-crc.c pwm: crc: Consistently name pwm_chip variables "chip" 2023-07-21 20:23:31 +02:00
pwm-cros-ec.c pwm: Explicitly include correct DT includes 2023-07-24 13:28:05 +02:00
pwm-dwc.c
pwm-ep93xx.c
pwm-fsl-ftm.c pwm: fsl-ftm: Handle clk_get_rate() returning 0 2025-04-25 10:45:21 +02:00
pwm-hibvt.c pwm: Explicitly include correct DT includes 2023-07-24 13:28:05 +02:00
pwm-img.c pwm: img: fix pwm clock lookup 2024-04-03 15:28:52 +02:00
pwm-imx-tpm.c pwm: imx-tpm: Use correct MODULO value for EPWM mode 2024-11-14 13:19:35 +01:00
pwm-imx1.c pwm: Explicitly include correct DT includes 2023-07-24 13:28:05 +02:00
pwm-imx27.c pwm: imx27: Workaround of the pwm output bug when decrease the duty cycle 2024-12-09 10:31:54 +01:00
pwm-intel-lgm.c
pwm-iqs620a.c
pwm-jz4740.c pwm: jz4740: Don't use dev_err_probe() in .request() 2024-01-25 15:35:46 -08:00
pwm-keembay.c
pwm-lp3943.c pwm: Explicitly include correct DT includes 2023-07-24 13:28:05 +02:00
pwm-lpc18xx-sct.c pwm: lpc18xx-sct: Simplify using devm_clk_get_enabled() 2023-07-28 09:38:04 +02:00
pwm-lpc32xx.c pwm: lpc32xx: Remove handling of PWM channels 2023-08-22 10:14:16 +02:00
pwm-lpss-pci.c
pwm-lpss-platform.c pwm: lpss-platform: Convert to platform remove callback returning void 2023-03-30 16:26:32 +02:00
pwm-lpss.c
pwm-lpss.h
pwm-mediatek.c pwm: mediatek: Prevent divide-by-zero in pwm_mediatek_config() 2025-04-25 10:45:20 +02:00
pwm-meson.c pwm: Explicitly include correct DT includes 2023-07-24 13:28:05 +02:00
pwm-microchip-core.c pwm: microchip-core: fix incorrect comparison with max period 2025-02-17 09:40:31 +01:00
pwm-mtk-disp.c pwm: Explicitly include correct DT includes 2023-07-24 13:28:05 +02:00
pwm-mxs.c
pwm-ntxec.c pwm: ntxec: Use device_set_of_node_from_dev() 2023-07-28 09:39:02 +02:00
pwm-omap-dmtimer.c pwm: omap-dmtimer: Convert to platform remove callback returning void 2023-03-30 16:26:33 +02:00
pwm-pca9685.c pwm: pca9685: Switch i2c driver back to use .probe() 2023-06-23 15:44:00 +02:00
pwm-pxa.c pwm: pxa: Don't reimplement of_device_get_match_data() 2023-07-28 09:38:18 +02:00
pwm-raspberrypi-poe.c
pwm-rcar.c pwm: rcar: Improve register calculation 2025-04-25 10:45:20 +02:00
pwm-renesas-tpu.c
pwm-rockchip.c pwm: rockchip: Consistently name pwm_chip variables "chip" 2023-07-21 20:23:31 +02:00
pwm-rz-mtu3.c pwm: rz-mtu3: Fix build warning 'num_channel_ios' not described 2023-07-28 09:24:43 +02:00
pwm-samsung.c of: remove internal arguments from of_property_for_each_u32() 2025-02-08 09:51:51 +01:00
pwm-sifive.c pwm: Explicitly include correct DT includes 2023-07-24 13:28:05 +02:00
pwm-sl28cpld.c pwm: Explicitly include correct DT includes 2023-07-24 13:28:05 +02:00
pwm-spear.c pwm: spear: Convert to platform remove callback returning void 2023-03-30 16:26:35 +02:00
pwm-sprd.c pwm: Explicitly include correct DT includes 2023-07-24 13:28:05 +02:00
pwm-sti.c pwm: sti: Simplify probe function using devm functions 2024-06-12 11:11:46 +02:00
pwm-stm32-lp.c pwm: stm32-lp: Add check for clk_enable() 2025-02-08 09:51:53 +01:00
pwm-stm32.c pwm: stm32: Add check for clk_enable() 2025-02-08 09:52:02 +01:00
pwm-stmpe.c pwm: stmpe: Handle errors when disabling the signal 2023-07-28 09:49:18 +02:00
pwm-sun4i.c pwm: Explicitly include correct DT includes 2023-07-24 13:28:05 +02:00
pwm-sunplus.c pwm: Explicitly include correct DT includes 2023-07-24 13:28:05 +02:00
pwm-tegra.c pwm: Explicitly include correct DT includes 2023-07-24 13:28:05 +02:00
pwm-tiecap.c pwm: Explicitly include correct DT includes 2023-07-24 13:28:05 +02:00
pwm-tiehrpwm.c pwm: Explicitly include correct DT includes 2023-07-24 13:28:05 +02:00
pwm-twl-led.c pwm: Rename pwm_apply_state() to pwm_apply_might_sleep() 2024-06-12 11:12:24 +02:00
pwm-twl.c
pwm-visconti.c pwm: Explicitly include correct DT includes 2023-07-24 13:28:05 +02:00
pwm-vt8500.c pwm: Rename pwm_apply_state() to pwm_apply_might_sleep() 2024-06-12 11:12:24 +02:00
pwm-xilinx.c pwm: xilinx: Convert to platform remove callback returning void 2023-03-30 16:26:40 +02:00
sysfs.c pwm: Rename pwm_apply_state() to pwm_apply_might_sleep() 2024-06-12 11:12:24 +02:00