public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] leds: pwm: Fix an error code
@ 2023-07-11  8:30 Fei Shao
  2023-07-11  9:09 ` Andy Shevchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Fei Shao @ 2023-07-11  8:30 UTC (permalink / raw)
  To: Lee Jones, Andy Shevchenko
  Cc: Fei Shao, Pavel Machek, linux-kernel, linux-leds

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-07-12 13:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-11  8:30 [PATCH] leds: pwm: Fix an error code Fei Shao
2023-07-11  9:09 ` Andy Shevchenko
2023-07-11  9:20   ` Fei Shao
2023-07-12 12:00   ` Lee Jones
2023-07-12 12:49     ` Andy Shevchenko
2023-07-12 13:07       ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox