linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Tudor Ambarus <tudor.ambarus@linaro.org>
To: Krzysztof Kozlowski <krzk@kernel.org>,
	 Alim Akhtar <alim.akhtar@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org,  linux-kernel@vger.kernel.org,
	peter.griffin@linaro.org,  andre.draszik@linaro.org,
	willmcvicker@google.com, kernel-team@android.com,
	 Tudor Ambarus <tudor.ambarus@linaro.org>
Subject: [PATCH 3/4] soc: samsung: exynos-chipid: simplify with dev_err_probe
Date: Wed, 12 Nov 2025 08:48:22 +0000	[thread overview]
Message-ID: <20251112-chipid-trivial-v1-3-ec2dea03bd83@linaro.org> (raw)
In-Reply-To: <20251112-chipid-trivial-v1-0-ec2dea03bd83@linaro.org>

Use dev_err_probe() to make error code handling simpler and to get
the standardized format of the error code ("ENODEV" instead of -19).

Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
---
 drivers/soc/samsung/exynos-chipid.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/samsung/exynos-chipid.c b/drivers/soc/samsung/exynos-chipid.c
index 3671ed718b933a2dbb9e154202bd3235e3efd758..b5866a324d8ae911a5c99d0290328efdcc072dfd 100644
--- a/drivers/soc/samsung/exynos-chipid.c
+++ b/drivers/soc/samsung/exynos-chipid.c
@@ -143,10 +143,8 @@ static int exynos_chipid_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	soc_dev_attr->soc_id = exynos_product_id_to_soc_id(soc_info.product_id);
-	if (!soc_dev_attr->soc_id) {
-		pr_err("Unknown SoC\n");
-		return -ENODEV;
-	}
+	if (!soc_dev_attr->soc_id)
+		return dev_err_probe(dev, -ENODEV, "Unknown SoC\n");
 
 	/* please note that the actual registration will be deferred */
 	soc_dev = soc_device_register(soc_dev_attr);

-- 
2.51.2.1041.gc1ab5b90ca-goog



  parent reply	other threads:[~2025-11-12  8:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-12  8:48 [PATCH 0/4] soc: samsung: exynos-chipid: trivial updates to simplify code Tudor Ambarus
2025-11-12  8:48 ` [PATCH 1/4] soc: samsung: exynos-chipid: prepend exynos_ to a method's name Tudor Ambarus
2025-11-12  8:48 ` [PATCH 2/4] soc: samsung: exynos-chipid: downgrade dev_info to dev_dbg for soc info Tudor Ambarus
2025-11-12  8:48 ` Tudor Ambarus [this message]
2025-11-12  8:48 ` [PATCH 4/4] soc: samsung: exynos-chipid: use devm action to unregister soc device Tudor Ambarus
2025-11-18 14:01 ` [PATCH 0/4] soc: samsung: exynos-chipid: trivial updates to simplify code Tudor Ambarus
2025-11-19 12:12 ` Krzysztof Kozlowski

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=20251112-chipid-trivial-v1-3-ec2dea03bd83@linaro.org \
    --to=tudor.ambarus@linaro.org \
    --cc=alim.akhtar@samsung.com \
    --cc=andre.draszik@linaro.org \
    --cc=kernel-team@android.com \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=peter.griffin@linaro.org \
    --cc=willmcvicker@google.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;
as well as URLs for NNTP newsgroup(s).