pwm: stm32: Fix error message to not describe the previous error path
BugLink: https://bugs.launchpad.net/bugs/2076435 commit f01af3022d4a46362c5dda3d35dea939f3246d10 upstream. "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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Portia Stephens <portia.stephens@canonical.com> Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
This commit is contained in:
committed by
Stefan Bader
parent
59651ef7f8
commit
a912dde3d6
@@ -677,7 +677,8 @@ static int stm32_pwm_probe(struct platform_device *pdev)
|
||||
* .apply() won't overflow.
|
||||
*/
|
||||
if (clk_get_rate(priv->clk) > 1000000000)
|
||||
return dev_err_probe(dev, -EINVAL, "Failed to lock clock\n");
|
||||
return dev_err_probe(dev, -EINVAL, "Clock freq too high (%lu)\n",
|
||||
clk_get_rate(priv->clk));
|
||||
|
||||
|
||||
/* Initialize clock refcount to number of enabled PWM channels. */
|
||||
|
||||
Reference in New Issue
Block a user