linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Krzysztof Kozlowski <krzk@kernel.org>,
	 Thierry Reding <thierry.reding@gmail.com>,
	 Jonathan Hunter <jonathanh@nvidia.com>
Cc: linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org,
	 Aaron Kling <webgeek1234@gmail.com>,
	 Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: [PATCH v2 05/13] memory: tegra30-emc: Do not print error on icc_node_create() failure
Date: Thu, 11 Sep 2025 11:43:16 +0200	[thread overview]
Message-ID: <20250911-memory-tegra-cleanup-v2-5-d08022ff2f85@linaro.org> (raw)
In-Reply-To: <20250911-memory-tegra-cleanup-v2-0-d08022ff2f85@linaro.org>

icc_node_create() is alloc-like function, so no need to print error
messages on its failure.  Dropping one label makes the code a bit
simpler.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/memory/tegra/tegra30-emc.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/memory/tegra/tegra30-emc.c b/drivers/memory/tegra/tegra30-emc.c
index 921dce1b8bc6382ea66d70ad0f2a12283316ad90..c96aa63a5aa085a409ae7ec901d2a210748f5bcb 100644
--- a/drivers/memory/tegra/tegra30-emc.c
+++ b/drivers/memory/tegra/tegra30-emc.c
@@ -1534,10 +1534,8 @@ static int tegra_emc_interconnect_init(struct tegra_emc *emc)
 
 	/* create External Memory Controller node */
 	node = icc_node_create(TEGRA_ICC_EMC);
-	if (IS_ERR(node)) {
-		err = PTR_ERR(node);
-		goto err_msg;
-	}
+	if (IS_ERR(node))
+		return PTR_ERR(node);
 
 	node->name = "External Memory Controller";
 	icc_node_add(node, &emc->provider);
@@ -1565,7 +1563,6 @@ static int tegra_emc_interconnect_init(struct tegra_emc *emc)
 
 remove_nodes:
 	icc_nodes_remove(&emc->provider);
-err_msg:
 	dev_err(emc->dev, "failed to initialize ICC: %d\n", err);
 
 	return err;

-- 
2.48.1


  parent reply	other threads:[~2025-09-11  9:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-11  9:43 [PATCH v2 00/13] memory: tegra: Several cleanups Krzysztof Kozlowski
2025-09-11  9:43 ` [PATCH v2 01/13] memory: tegra124-emc: Simplify return of emc_init() Krzysztof Kozlowski
2025-09-17 13:12   ` Jon Hunter
2025-09-11  9:43 ` [PATCH v2 02/13] memory: tegra124-emc: Do not print error on icc_node_create() failure Krzysztof Kozlowski
2025-09-11  9:43 ` [PATCH v2 03/13] memory: tegra186-emc: " Krzysztof Kozlowski
2025-09-11  9:43 ` [PATCH v2 04/13] memory: tegra20-emc: " Krzysztof Kozlowski
2025-09-11  9:43 ` Krzysztof Kozlowski [this message]
2025-09-11  9:43 ` [PATCH v2 06/13] memory: tegra30-emc: Simplify and handle deferred probe with dev_err_probe() Krzysztof Kozlowski
2025-09-11  9:43 ` [PATCH v2 07/13] memory: tegra20-emc: " Krzysztof Kozlowski
2025-09-11  9:43 ` [PATCH v2 08/13] memory: tegra186-emc: " Krzysztof Kozlowski
2025-09-11  9:43 ` [PATCH v2 09/13] memory: tegra124-emc: " Krzysztof Kozlowski
2025-09-11  9:43 ` [PATCH v2 10/13] memory: tegra124-emc: Add the SoC model prefix to functions Krzysztof Kozlowski
2025-09-11  9:43 ` [PATCH v2 11/13] memory: tegra186-emc: " Krzysztof Kozlowski
2025-09-11  9:43 ` [PATCH v2 12/13] memory: tegra20-emc: " Krzysztof Kozlowski
2025-09-11  9:43 ` [PATCH v2 13/13] memory: tegra30-emc: " Krzysztof Kozlowski
2025-09-17 13:13 ` [PATCH v2 00/13] memory: tegra: Several cleanups Jon Hunter
2025-10-13  0:23 ` 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=20250911-memory-tegra-cleanup-v2-5-d08022ff2f85@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=jonathanh@nvidia.com \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=webgeek1234@gmail.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).