lkml.org 
[lkml]   [2023]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] leds: pwm: Fix an error code
Date
Use the negated -EINVAL as the error code.

Fixes: 95138e01275e ("leds: pwm: Make error handling more robust")
Signed-off-by: Fei Shao <fshao@chromium.org>

---

drivers/leds/leds-pwm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c
index 29194cc382af..87c199242f3c 100644
--- a/drivers/leds/leds-pwm.c
+++ b/drivers/leds/leds-pwm.c
@@ -146,7 +146,7 @@ static int led_pwm_create_fwnode(struct device *dev, struct led_pwm_priv *priv)
led.name = to_of_node(fwnode)->name;

if (!led.name) {
- ret = EINVAL;
+ ret = -EINVAL;
goto err_child_out;
}

--
2.41.0.390.g38632f3daf-goog
\
 
 \ /
  Last update: 2023-07-11 10:32    [W:0.029 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site