Re: [PATCH 1/2] pwm: renesas-tpu: better errno for impossible rates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 15.09.2021 9:55, Wolfram Sang wrote:

From: Duc Nguyen <duc.nguyen.ub@xxxxxxxxxxx>

ENOTSUP has confused users. EINVAL has been considered clearer. Change
the errno, we were the only ones using ENOTSUP in this subsystem anyhow.

   It's ENOTSUPP in the code. :-)


Signed-off-by: Duc Nguyen <duc.nguyen.ub@xxxxxxxxxxx>
[wsa: split and reworded commit message]
Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
---
  drivers/pwm/pwm-renesas-tpu.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-renesas-tpu.c b/drivers/pwm/pwm-renesas-tpu.c
index 4381df90a527..754440194650 100644
--- a/drivers/pwm/pwm-renesas-tpu.c
+++ b/drivers/pwm/pwm-renesas-tpu.c
@@ -269,7 +269,7 @@ static int tpu_pwm_config(struct pwm_chip *chip, struct pwm_device *_pwm,
if (prescaler == ARRAY_SIZE(prescalers) || period == 0) {
  		dev_err(&tpu->pdev->dev, "clock rate mismatch\n");
-		return -ENOTSUPP;
+		return -EINVAL;
  	}
if (duty_ns) {

MBR, Sergei



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux