mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rishi Gupta <gupt21@gmail.com>
To: support.opensource@diasemi.com, Adam.Thomson.Opensource@diasemi.com
Cc: axel.lin@ingics.com, lgirdwood@gmail.com, broonie@kernel.org,
	linux-kernel@vger.kernel.org, Rishi Gupta <gupt21@gmail.com>
Subject: [PATCH] regulator: da9063: remove redundant return statement
Date: Thu,  6 Feb 2020 19:19:56 +0530	[thread overview]
Message-ID: <1580996996-28798-1-git-send-email-gupt21@gmail.com> (raw)

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>
---
 drivers/regulator/da9063-regulator.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/regulator/da9063-regulator.c b/drivers/regulator/da9063-regulator.c
index 2aceb3b..70554b0 100644
--- a/drivers/regulator/da9063-regulator.c
+++ b/drivers/regulator/da9063-regulator.c
@@ -867,12 +867,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 = {
-- 
2.7.4


             reply	other threads:[~2020-02-06 13:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-06 13:49 Rishi Gupta [this message]
2020-02-11 15:51 ` Applied "regulator: da9063: remove redundant return statement" to the regulator tree Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2020-02-06  4:36 [PATCH] regulator: da9063: remove redundant return statement Rishi Gupta
2020-02-06 11:32 ` Mark Brown
2020-02-06 13:50   ` rishi gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1580996996-28798-1-git-send-email-gupt21@gmail.com \
    --to=gupt21@gmail.com \
    --cc=Adam.Thomson.Opensource@diasemi.com \
    --cc=axel.lin@ingics.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=support.opensource@diasemi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®