Skip to content

Commit

Permalink
leds: pwm: Fix error code in led_pwm_create_fwnode()
Browse files Browse the repository at this point in the history
[ Upstream commit cadb2de ]

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

Fixes: 95138e0 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Dan Carpenter authored and gregkh committed Sep 13, 2023
1 parent cae0787 commit 2804cc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/leds/leds-pwm.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit 2804cc3

Please sign in to comment.