linux-stable/drivers/pwm
Heiner Kallweit b55c769efa pwm: meson: fix handling of period/duty if greater than UINT_MAX
commit 87a2cbf02d upstream.

state->period/duty are of type u64, and if their value is greater than
UINT_MAX, then the cast to uint will cause problems. Fix this by
changing the type of the respective local variables to u64.

Fixes: b79c3670e1 ("pwm: meson: Don't duplicate the polarity internally")
Cc: stable@vger.kernel.org
Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-23 13:54:11 +02:00
..
Kconfig pwm: Add Apple PWM controller 2023-04-06 16:31:38 +02:00
Makefile pwm: Add Apple PWM controller 2023-04-06 16:31:38 +02:00
core.c pwm: Remove unused radix tree 2023-04-14 11:35:52 +02:00
pwm-ab8500.c pwm: ab8500: Fix error code in probe() 2023-07-19 16:36:40 +02:00
pwm-apple.c pwm: Add Apple PWM controller 2023-04-06 16:31:38 +02:00
pwm-atmel-hlcdc.c pwm: atmel-hlcdc: Convert to platform remove callback returning void 2023-03-30 16:26:21 +02:00
pwm-atmel-tcb.c pwm: atmel-tcb: Convert to platform remove callback returning void 2023-03-30 16:26:22 +02:00
pwm-atmel.c pwm: atmel: Convert to platform remove callback returning void 2023-03-30 16:26:23 +02:00
pwm-bcm-iproc.c pwm: bcm-iproc: Convert to platform remove callback returning void 2023-03-30 16:26:24 +02:00
pwm-bcm-kona.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 2) 2022-06-10 14:51:35 +02:00
pwm-bcm2835.c pwm: bcm2835: Convert to platform remove callback returning void 2023-03-30 16:26:25 +02:00
pwm-berlin.c pwm: berlin: Convert to platform remove callback returning void 2023-03-30 16:26:26 +02:00
pwm-brcmstb.c pwm: brcmstb: Convert to platform remove callback returning void 2023-03-30 16:26:26 +02:00
pwm-clk.c pwm: clk: Convert to platform remove callback returning void 2023-03-30 16:26:27 +02:00
pwm-clps711x.c pwm: clps71xx: Implement .apply() callback 2022-04-22 18:52:30 +02:00
pwm-crc.c pwm: crc: Propagate errors in .get_state() to the caller 2022-12-06 12:46:25 +01:00
pwm-cros-ec.c pwm: cros-ec: Convert to platform remove callback returning void 2023-03-30 16:26:28 +02:00
pwm-dwc.c pwm: dwc: Use devm_pwmchip_add() 2023-02-20 12:26:35 +01:00
pwm-ep93xx.c
pwm-fsl-ftm.c pwm: fsl-ftm: Use regmap_clear_bits and regmap_set_bits where applicable 2022-12-06 12:46:08 +01:00
pwm-hibvt.c pwm: hibvt: Convert to platform remove callback returning void 2023-03-30 16:26:29 +02:00
pwm-img.c pwm: img: Convert to platform remove callback returning void 2023-03-30 16:26:29 +02:00
pwm-imx-tpm.c pwm: imx-tpm: force 'real_period' to be zero in suspend 2023-07-19 16:36:39 +02:00
pwm-imx1.c
pwm-imx27.c pwm: imx27: Propagate errors in .get_state() to the caller 2022-12-06 12:46:26 +01:00
pwm-intel-lgm.c pwm: Make .get_state() callback return an error code 2022-12-06 12:46:22 +01:00
pwm-iqs620a.c pwm: iqs620a: Explicitly set .polarity in .get_state() 2023-03-23 14:44:41 +01:00
pwm-jz4740.c pwm: jz4740: Use regmap_{set,clear}_bits 2022-11-29 13:06:47 +01:00
pwm-keembay.c pwm: Make .get_state() callback return an error code 2022-12-06 12:46:22 +01:00
pwm-lp3943.c pwm: lp3943: Drop unused i2c include 2023-01-30 17:20:30 +01:00
pwm-lpc18xx-sct.c pwm: lpc18xx-sct: Convert to platform remove callback returning void 2023-03-30 16:26:31 +02:00
pwm-lpc32xx.c pwm: lpc32xx: Implement .apply() callback 2022-05-20 16:29:01 +02:00
pwm-lpss-pci.c pwm: lpss: Rename pwm_lpss_probe() --> devm_pwm_lpss_probe() 2022-11-22 16:36:27 +02:00
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: Changes for v6.2-rc1 2022-12-21 09:41:28 -08:00
pwm-lpss.h pwm: lpss: Allow other drivers to enable PWM LPSS 2022-11-22 16:36:27 +02:00
pwm-mediatek.c pwm: mediatek: Add support for MT7986 2022-12-06 12:46:12 +01:00
pwm-meson.c pwm: meson: fix handling of period/duty if greater than UINT_MAX 2023-07-23 13:54:11 +02:00
pwm-mtk-disp.c pwm: mtk_disp: Fix the disable flow of disp_pwm 2023-07-19 16:36:40 +02:00
pwm-mxs.c
pwm-ntxec.c
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: Convert to i2c's .probe_new() 2022-12-06 12:46:31 +01:00
pwm-pxa.c pwm: pxa: Add reference manual link and limitations 2022-12-06 12:46:15 +01:00
pwm-raspberrypi-poe.c pwm: Make .get_state() callback return an error code 2022-12-06 12:46:22 +01:00
pwm-rcar.c pwm: rcar: Drop of_match_ptr for ID table 2023-04-06 15:41:24 +02:00
pwm-renesas-tpu.c pwm: renesas-tpu: Improve precision of period and duty_cycle calculation 2022-05-20 16:18:40 +02:00
pwm-rockchip.c pwm: rockchip: Convert to platform remove callback returning void 2023-03-30 16:26:34 +02:00
pwm-samsung.c pwm: samsung: Convert to platform remove callback returning void 2023-03-30 16:26:34 +02:00
pwm-sifive.c pwm: sifive: Convert to platform remove callback returning void 2023-03-30 16:26:35 +02:00
pwm-sl28cpld.c pwm: Make .get_state() callback return an error code 2022-12-06 12:46:22 +01: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: sprd: Convert to platform remove callback returning void 2023-03-30 16:26:36 +02:00
pwm-sti.c pwm: sti: Convert to platform remove callback returning void 2023-03-30 16:26:36 +02:00
pwm-stm32-lp.c pwm: stm32-lp: Drop of_match_ptr for ID table 2023-04-06 15:42:22 +02:00
pwm-stm32.c pwm: stm32: Enforce settings for PWM capture 2023-04-06 16:35:01 +02:00
pwm-stmpe.c pwm: stmpe: Implement .apply() callback 2022-05-20 16:28:35 +02:00
pwm-sun4i.c pwm: sun4i: Convert to platform remove callback returning void 2023-03-30 16:26:37 +02:00
pwm-sunplus.c pwm: Make .get_state() callback return an error code 2022-12-06 12:46:22 +01:00
pwm-tegra.c pwm: tegra: Convert to platform remove callback returning void 2023-03-30 16:26:38 +02:00
pwm-tiecap.c pwm: tiecap: Convert to platform remove callback returning void 2023-03-30 16:26:38 +02:00
pwm-tiehrpwm.c pwm: tiehrpwm: Convert to platform remove callback returning void 2023-03-30 16:26:39 +02:00
pwm-twl-led.c pwm: twl-led: Document some limitations and link to the reference manual 2022-07-29 13:41:18 +02:00
pwm-twl.c
pwm-visconti.c pwm: Make .get_state() callback return an error code 2022-12-06 12:46:22 +01:00
pwm-vt8500.c pwm: vt8500: Convert to platform remove callback returning void 2023-03-30 16:26:39 +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: sysfs: Do not apply state to already disabled PWMs 2023-07-19 16:36:40 +02:00