summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2023-07-11 09:13:34 +0300
committerLee Jones <lee@kernel.org>2023-07-28 09:26:24 +0100
commitcadb2de2a7fd9e955381307de3eddfcc386c208e (patch)
tree00a9de7f20fcb4a8a724d3ddeb47e692f8b325ca
parent51c8be0c58a73ac243515516f349d44090c54e9b (diff)
downloadlinux-stable-cadb2de2a7fd9e955381307de3eddfcc386c208e.tar.gz
linux-stable-cadb2de2a7fd9e955381307de3eddfcc386c208e.tar.bz2
linux-stable-cadb2de2a7fd9e955381307de3eddfcc386c208e.zip
leds: pwm: Fix error code in led_pwm_create_fwnode()
Negative -EINVAL was intended, not positive EINVAL. Fix it. Fixes: 95138e01275e ("leds: pwm: Make error handling more robust") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/a33b981a-b2c4-4dc2-b00a-626a090d2f11@moroto.mountain Signed-off-by: Lee Jones <lee@kernel.org>
-rw-r--r--drivers/leds/leds-pwm.c2
1 files changed, 1 insertions, 1 deletions
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;
}