mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shree Ramamoorthy <s-ramamoorthy@ti.com>
To: <aaro.koskinen@iki.fi>, <andreas@kemnade.info>,
	<khilman@baylibre.com>, <rogerq@kernel.org>, <tony@atomide.com>,
	<lgirdwood@gmail.com>, <broonie@kernel.org>,
	<linux-omap@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <m-leonard@ti.com>, <praneeth@ti.com>
Subject: [PATCH v1 1/4] regulator: tps65219: Use dev_err_probe() instead of dev_err()
Date: Tue, 17 Dec 2024 14:45:23 -0600	[thread overview]
Message-ID: <20241217204526.1010989-2-s-ramamoorthy@ti.com> (raw)
In-Reply-To: <20241217204526.1010989-1-s-ramamoorthy@ti.com>

Make the error message format unified by switching from dev_err() to
dev_err_probe() where there is a chance of -EPROBE_DEFER returned. This
helps simplify the error code where possible.

Signed-off-by: Shree Ramamoorthy <s-ramamoorthy@ti.com>
---
 drivers/regulator/tps65219-regulator.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/regulator/tps65219-regulator.c b/drivers/regulator/tps65219-regulator.c
index b4065356392f..14d843a99d0f 100644
--- a/drivers/regulator/tps65219-regulator.c
+++ b/drivers/regulator/tps65219-regulator.c
@@ -322,11 +322,11 @@ static int tps65219_regulator_probe(struct platform_device *pdev)
 		dev_dbg(tps->dev, "%s regul i= %d START", __func__, i);
 		rdev = devm_regulator_register(&pdev->dev, &regulators[i],
 					       &config);
-		if (IS_ERR(rdev)) {
-			dev_err(tps->dev, "failed to register %s regulator\n",
-				regulators[i].name);
-			return PTR_ERR(rdev);
-		}
+		if (IS_ERR(rdev))
+			return dev_err_probe(tps->dev, PTR_ERR(rdev),
+					"Failed to register %s regulator\n",
+					regulators[i].name);
+
 		rdevtbl[i] = rdev;
 		dev_dbg(tps->dev, "%s regul i= %d COMPLETED", __func__, i);
 	}
-- 
2.34.1


  reply	other threads:[~2024-12-17 20:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-17 20:45 [PATCH v1 0/4] TPS65219 Regulator Driver Cleanup Series Shree Ramamoorthy
2024-12-17 20:45 ` Shree Ramamoorthy [this message]
2024-12-17 20:45 ` [PATCH v1 2/4] regulator: tps65219: Update driver name Shree Ramamoorthy
2024-12-17 21:01   ` Mark Brown
2024-12-17 21:16     ` Andrew Davis
2024-12-17 21:19       ` Mark Brown
2024-12-17 20:45 ` [PATCH v1 3/4] regulator: tps65219: Remove MODULE_ALIAS Shree Ramamoorthy
2024-12-17 20:45 ` [PATCH v1 4/4] regulator: tps65219: Remove debugging helper function Shree Ramamoorthy
2024-12-18 14:20 ` [PATCH v1 0/4] TPS65219 Regulator Driver Cleanup Series Mark Brown

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=20241217204526.1010989-2-s-ramamoorthy@ti.com \
    --to=s-ramamoorthy@ti.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=andreas@kemnade.info \
    --cc=broonie@kernel.org \
    --cc=khilman@baylibre.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=m-leonard@ti.com \
    --cc=praneeth@ti.com \
    --cc=rogerq@kernel.org \
    --cc=tony@atomide.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®