aboutsummaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-pca9685.c
diff options
context:
space:
mode:
authorAndre Przywara <[email protected]>2022-12-02 19:35:37 +0100
committerThierry Reding <[email protected]>2022-12-06 12:46:30 +0100
commita08b318a155e77d4c61bbdc28248b347d66f7248 (patch)
tree056410bc36dfeeccc4cf633e853788ddebae753f /drivers/pwm/pwm-pca9685.c
parentc73a3107624ddc305483ced13deca9ce8a073783 (diff)
pwm: sun4i: Propagate errors in .get_state() to the caller
.get_state() can return an error indication now. Make use of it to propagate an impossible prescaler encoding, should that have sneaked in somehow. Also check the return value of clk_get_rate(). That's unlikely to fail, but we use that in two divide operations down in the code, so let's avoid a divide-by-zero condition on the way. Signed-off-by: Andre Przywara <[email protected]> Reviewed-by: Uwe Kleine-König <[email protected]> Reviewed-by: Samuel Holland <[email protected]> Reviewed-by: Jernej Skrabec <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
Diffstat (limited to 'drivers/pwm/pwm-pca9685.c')
0 files changed, 0 insertions, 0 deletions