mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dragan Simic <dsimic@manjaro.org>
To: linux-spi@vger.kernel.org, linux-rockchip@lists.infradead.org
Cc: broonie@kernel.org, heiko@sntech.de, gregkh@linuxfoundation.org,
	rafael@kernel.org, oss@helene.moe,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v3 3/5] spi: rockchip-sfc: Use dev_err_probe() in the probe path
Date: Sun, 29 Sep 2024 11:21:15 +0200	[thread overview]
Message-ID: <398229ef316e64dc0c27944ea793dcddef1ead4e.1727601608.git.dsimic@manjaro.org> (raw)
In-Reply-To: <cover.1727601608.git.dsimic@manjaro.org>

Use function dev_err_probe() in the probe path instead of dev_err() where
appropriate, to make the code a bit more uniform and compact.

Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Dragan Simic <dsimic@manjaro.org>
---
 drivers/spi/spi-rockchip-sfc.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/spi/spi-rockchip-sfc.c b/drivers/spi/spi-rockchip-sfc.c
index 505d5089bf03..7e0fb4944a34 100644
--- a/drivers/spi/spi-rockchip-sfc.c
+++ b/drivers/spi/spi-rockchip-sfc.c
@@ -580,16 +580,14 @@ static int rockchip_sfc_probe(struct platform_device *pdev)
 		return PTR_ERR(sfc->regbase);
 
 	sfc->clk = devm_clk_get(&pdev->dev, "clk_sfc");
-	if (IS_ERR(sfc->clk)) {
-		dev_err(&pdev->dev, "Failed to get sfc interface clk\n");
-		return PTR_ERR(sfc->clk);
-	}
+	if (IS_ERR(sfc->clk))
+		return dev_err_probe(&pdev->dev, PTR_ERR(sfc->clk),
+				     "Failed to get sfc interface clk\n");
 
 	sfc->hclk = devm_clk_get(&pdev->dev, "hclk_sfc");
-	if (IS_ERR(sfc->hclk)) {
-		dev_err(&pdev->dev, "Failed to get sfc ahb clk\n");
-		return PTR_ERR(sfc->hclk);
-	}
+	if (IS_ERR(sfc->hclk))
+		return dev_err_probe(&pdev->dev, PTR_ERR(sfc->hclk),
+				     "Failed to get sfc ahb clk\n");
 
 	sfc->use_dma = !of_property_read_bool(sfc->dev->of_node, "rockchip,sfc-no-dma");
 

  parent reply	other threads:[~2024-09-29  9:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-29  9:21 [PATCH v3 0/5] Add dev_warn_probe() and improve error handling in Rockchip SPI drivers Dragan Simic
2024-09-29  9:21 ` [PATCH v3 1/5] spi: rockchip: Perform trivial code cleanups Dragan Simic
2024-09-29  9:21 ` [PATCH v3 2/5] spi: rockchip-sfc: " Dragan Simic
2024-09-29  9:21 ` Dragan Simic [this message]
2024-09-29  9:21 ` [PATCH v3 4/5] driver core: Add device probe log helper dev_warn_probe() Dragan Simic
2024-10-01  9:02   ` Hélène Vulquin
2024-10-07 14:25   ` Mark Brown
2024-10-08 13:22     ` Greg KH
2024-10-08 13:22   ` Greg KH
2024-10-08 16:18   ` Dragan Simic
2024-10-08 17:00     ` Mark Brown
2024-10-08 17:32       ` Dragan Simic
2024-10-08 17:37         ` Mark Brown
2024-10-08 17:39           ` Dragan Simic
2024-09-29  9:21 ` [PATCH v3 5/5] spi: rockchip: Use dev_{err,warn}_probe() in the probe path Dragan Simic
2024-10-01  9:06   ` Hélène Vulquin
2024-10-10 11:14 ` [PATCH v3 0/5] Add dev_warn_probe() and improve error handling in Rockchip SPI drivers 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=398229ef316e64dc0c27944ea793dcddef1ead4e.1727601608.git.dsimic@manjaro.org \
    --to=dsimic@manjaro.org \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=oss@helene.moe \
    --cc=rafael@kernel.org \
    /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®