Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

pwm: stm32: Fix error message to not describe the previous error path

"Failed to lock the clock" is an appropriate error message for
clk_rate_exclusive_get() failing, but not for the clock running too
fast for the driver's calculations.

Adapt the error message accordingly.

Fixes: d44d635635a7 ("pwm: stm32: Fix for settings using period > UINT32_MAX")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/285182163211203fc823a65b180761f46e828dcb.1718979150.git.u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>

authored by

Uwe Kleine-König and committed by
Uwe Kleine-König
f01af302 dab8f9f0

+2 -1
+2 -1
drivers/pwm/pwm-stm32.c
··· 681 681 * .apply() won't overflow. 682 682 */ 683 683 if (clk_get_rate(priv->clk) > 1000000000) 684 - return dev_err_probe(dev, -EINVAL, "Failed to lock clock\n"); 684 + return dev_err_probe(dev, -EINVAL, "Clock freq too high (%lu)\n", 685 + clk_get_rate(priv->clk)); 685 686 686 687 chip->ops = &stm32pwm_ops; 687 688