Commit cadb2de2 authored by Dan Carpenter's avatar Dan Carpenter Committed by Lee Jones

leds: pwm: Fix error code in led_pwm_create_fwnode()

Negative -EINVAL was intended, not positive EINVAL.  Fix it.

Fixes: 95138e01 ("leds: pwm: Make error handling more robust")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/a33b981a-b2c4-4dc2-b00a-626a090d2f11@moroto.mountainSigned-off-by: default avatarLee Jones <lee@kernel.org>
parent 51c8be0c
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment