aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-rcar.c
diff options
context:
space:
mode:
authorThierry Reding <[email protected]>2020-11-11 20:18:11 +0000
committerThierry Reding <[email protected]>2020-12-17 13:18:59 +0000
commit2b1c1a5d51484f4f44d662d146e443498d0bedd2 (patch)
treeaf1909df89de7c189f4c1998f46fba31d8a6a63d /drivers/pwm/pwm-rcar.c
parentpwm: sti: Remove unnecessary blank line (diff)
downloadkernel-2b1c1a5d51484f4f44d662d146e443498d0bedd2.tar.gz
kernel-2b1c1a5d51484f4f44d662d146e443498d0bedd2.zip
pwm: Use -EINVAL for unsupported polarity
Instead of using a mix of -EOPNOTSUPP and -ENOTSUPP, use the more standard -EINVAL to signal that the specified polarity value was invalid. Acked-by: Uwe Kleine-König <[email protected]> Acked-by: Lee Jones <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
Diffstat (limited to 'drivers/pwm/pwm-rcar.c')
-rw-r--r--drivers/pwm/pwm-rcar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-rcar.c b/drivers/pwm/pwm-rcar.c
index 3e23f1e4e1f6..002ab79a7ec2 100644
--- a/drivers/pwm/pwm-rcar.c
+++ b/drivers/pwm/pwm-rcar.c
@@ -168,7 +168,7 @@ static int rcar_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
/* This HW/driver only supports normal polarity */
if (state->polarity != PWM_POLARITY_NORMAL)
- return -ENOTSUPP;
+ return -EINVAL;
if (!state->enabled) {
rcar_pwm_disable(rp);