The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Nipun Gupta <nipun.gupta@amd.com>,
	 Nikhil Agarwal <nikhil.agarwal@amd.com>
Cc: linux-kernel@vger.kernel.org,
	 Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: [PATCH v3 2/5] cdx: controller: Simplify with dev_err_probe()
Date: Fri, 02 May 2025 08:20:34 +0200	[thread overview]
Message-ID: <20250502-cdx-clean-v3-2-6aaa5b369fc5@linaro.org> (raw)
In-Reply-To: <20250502-cdx-clean-v3-0-6aaa5b369fc5@linaro.org>

Simplify printing probe failures and handling deferred probe with
dev_err_probe().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/cdx/controller/cdx_controller.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/cdx/controller/cdx_controller.c b/drivers/cdx/controller/cdx_controller.c
index d623f9c7517a86c06082c0db348688e7f33b7be6..3df35833f0e0a994af0606eee0dc1dfc9c7c22f9 100644
--- a/drivers/cdx/controller/cdx_controller.c
+++ b/drivers/cdx/controller/cdx_controller.c
@@ -195,15 +195,13 @@ static int xlnx_cdx_probe(struct platform_device *pdev)
 	/* Create MSI domain */
 	cdx->msi_domain = cdx_msi_domain_init(&pdev->dev);
 	if (!cdx->msi_domain) {
-		dev_err(&pdev->dev, "cdx_msi_domain_init() failed");
-		ret = -ENODEV;
+		ret = dev_err_probe(&pdev->dev, -ENODEV, "cdx_msi_domain_init() failed");
 		goto cdx_msi_fail;
 	}
 
 	ret = cdx_setup_rpmsg(pdev);
 	if (ret) {
-		if (ret != -EPROBE_DEFER)
-			dev_err(&pdev->dev, "Failed to register CDX RPMsg transport\n");
+		dev_err_probe(&pdev->dev, ret, "Failed to register CDX RPMsg transport\n");
 		goto cdx_rpmsg_fail;
 	}
 

-- 
2.45.2


  parent reply	other threads:[~2025-05-02  6:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-02  6:20 [PATCH v3 0/5] cdx: Minor cleanups Krzysztof Kozlowski
2025-05-02  6:20 ` [PATCH v3 1/5] cdx: Enable compile testing Krzysztof Kozlowski
2025-05-02  6:20 ` Krzysztof Kozlowski [this message]
2025-05-02  6:20 ` [PATCH v3 3/5] cdx: controller: Drop useless probe success message Krzysztof Kozlowski
2025-05-02  6:20 ` [PATCH v3 4/5] cdx: controller: Do not open-code module_platform_driver() Krzysztof Kozlowski
2025-05-02  6:20 ` [PATCH v3 5/5] cdx: controller: Drop unneeded driver.pm NULL assignment Krzysztof Kozlowski
2025-05-06 10:59 ` [PATCH v3 0/5] cdx: Minor cleanups Agarwal, Nikhil
2025-05-22 18:30   ` Krzysztof Kozlowski
2025-06-03  7:33     ` Agarwal, Nikhil
2025-06-03  7:50       ` Greg KH

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=20250502-cdx-clean-v3-2-6aaa5b369fc5@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nikhil.agarwal@amd.com \
    --cc=nipun.gupta@amd.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