Skip to content

Commit cdcffaf

Browse files
Dan Carpenterthierryreding
authored andcommitted
pwm: ab8500: Fix error code in probe()
This code accidentally return positive EINVAL instead of negative -EINVAL. Fixes: eb41f33 ("pwm: ab8500: Fix register offset calculation to not depend on probe order") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Uwe Kleine-König <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent de0bb6a commit cdcffaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pwm/pwm-ab8500.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ static int ab8500_pwm_probe(struct platform_device *pdev)
190190
int err;
191191

192192
if (pdev->id < 1 || pdev->id > 31)
193-
return dev_err_probe(&pdev->dev, EINVAL, "Invalid device id %d\n", pdev->id);
193+
return dev_err_probe(&pdev->dev, -EINVAL, "Invalid device id %d\n", pdev->id);
194194

195195
/*
196196
* Nothing to be done in probe, this is required to get the

0 commit comments

Comments
 (0)