Skip to content

Commit

Permalink
regulator: da9063: remove redundant return statement
Browse files Browse the repository at this point in the history
The devm_request_threaded_irq() already returns 0 on success
and negative error code on failure. So return from this itself
can be used while preserving error log in case of failure.

Signed-off-by: Rishi Gupta <gupt21@gmail.com>
Link: https://lore.kernel.org/r/1580996996-28798-1-git-send-email-gupt21@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Rishi Gupta authored and Mark Brown committed Feb 11, 2020
1 parent a33b25f commit 6d8d840
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/regulator/da9063-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -877,12 +877,10 @@ static int da9063_regulator_probe(struct platform_device *pdev)
NULL, da9063_ldo_lim_event,
IRQF_TRIGGER_LOW | IRQF_ONESHOT,
"LDO_LIM", regulators);
if (ret) {
if (ret)
dev_err(&pdev->dev, "Failed to request LDO_LIM IRQ.\n");
return ret;
}

return 0;
return ret;
}

static struct platform_driver da9063_regulator_driver = {
Expand Down

0 comments on commit 6d8d840

Please sign in to comment.