[PATCH] pwm: pwm-meson: fix handling of period/duty if greater than UINT_MAX
Martin Blumenstingl
martin.blumenstingl at googlemail.com
Mon May 8 12:46:09 PDT 2023
On Wed, May 3, 2023 at 9:58 PM Heiner Kallweit <hkallweit1 at gmail.com> wrote:
>
> 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: b79c3670e120 ("pwm: meson: Don't duplicate the polarity internally")
> Cc: stable at vger.kernel.org
> Suggested-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
> Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
More information about the linux-arm-kernel
mailing list