Message ID | a33b981a-b2c4-4dc2-b00a-626a090d2f11@moroto.mountain |
---|---|
State | New |
Headers | show |
Series | leds: pwm: Fix error code in led_pwm_create_fwnode() | expand |
On Tue, 11 Jul 2023, Dan Carpenter wrote: > 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> > --- > drivers/leds/leds-pwm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks
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; }
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> --- drivers/leds/leds-pwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)