pwm: meson: fix handling of period/duty if greater than UINT_MAX
stable inclusion from stable-v5.10.190 commit e3454b438c67d0ec582dd3fbda17fa9ec520ddb7 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I928UI Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e3454b438c67d0ec582dd3fbda17fa9ec520ddb7 -------------------------------- [ Upstream commit 87a2cbf0 ] 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: b79c3670 ("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:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment