]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
memory: tegra186-emc: Do not print error on icc_node_create() failure
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Thu, 11 Sep 2025 09:43:14 +0000 (11:43 +0200)
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Mon, 13 Oct 2025 00:22:58 +0000 (02:22 +0200)
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.

Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
drivers/memory/tegra/tegra186-emc.c

index d6cd90c7ad5380a9ff9052a60f62c9bcc4fdac5f..00baa7ab89214b1a151ab0c0a9ab76f90f922478 100644 (file)
@@ -273,10 +273,8 @@ static int tegra_emc_interconnect_init(struct tegra186_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);
@@ -304,7 +302,6 @@ static int tegra_emc_interconnect_init(struct tegra186_emc *emc)
 
 remove_nodes:
        icc_nodes_remove(&emc->provider);
-err_msg:
        dev_err(emc->dev, "failed to initialize ICC: %d\n", err);
 
        return err;