diff options
author | Uwe Kleine-König <u.kleine-koenig@baylibre.com> | 2024-06-21 16:37:12 +0200 |
---|---|---|
committer | Uwe Kleine-König <ukleinek@kernel.org> | 2024-06-21 16:39:34 +0200 |
commit | c45fcf46ca2368dafe7e5c513a711a6f0f974308 (patch) | |
tree | 22df1bcfab5b26f34dbc486eac939a3bba5567f0 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 (diff) |
pwm: stm32: Refuse too small period requests
If period_ns is small, prd might well become 0. Catch that case because
otherwise with
regmap_write(priv->regmap, TIM_ARR, prd - 1);
a few lines down quite a big period is configured.
Fixes: 7edf7369205b ("pwm: Add driver for STM32 plaftorm")
Cc: stable@vger.kernel.org
Reviewed-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/b86f62f099983646f97eeb6bfc0117bb2d0c340d.1718979150.git.u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
0 files changed, 0 insertions, 0 deletions