Commit cdcffafc authored by Dan Carpenter's avatar Dan Carpenter Committed by Thierry Reding
Browse files

pwm: ab8500: Fix error code in probe()



This code accidentally return positive EINVAL instead of negative
-EINVAL.

Fixes: eb41f334 ("pwm: ab8500: Fix register offset calculation to not depend on probe order")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent de0bb6a8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -190,7 +190,7 @@ static int ab8500_pwm_probe(struct platform_device *pdev)
	int err;

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

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