mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mmc: sdhci-of-arasan: Omit a variable reassignment in sdhci_arasan_probe()
@ 2025-10-20 13:22 Markus Elfring
  2025-10-21  6:10 ` Michal Simek
  2025-10-21 11:48 ` Ulf Hansson
  0 siblings, 2 replies; 3+ messages in thread
From: Markus Elfring @ 2025-10-20 13:22 UTC (permalink / raw)
  To: linux-mmc, linux-arm-kernel, Adrian Hunter, Andy Shevchenko,
	Michal Simek, Muhammad Husaini Zulkifli, Ulf Hansson
  Cc: LKML, Anand Moon, Christophe Jaillet

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 20 Oct 2025 15:15:07 +0200

An error code was assigned to a variable and checked accordingly.
This value was passed to a dev_err_probe() call in an if branch.
This function is documented in the way that the same value is returned.
Thus delete a redundant variable reassignment.

The source code was transformed by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/mmc/host/sdhci-of-arasan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
index c6f09b53325d..b97d042897ad 100644
--- a/drivers/mmc/host/sdhci-of-arasan.c
+++ b/drivers/mmc/host/sdhci-of-arasan.c
@@ -1991,7 +1991,7 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
 
 	ret = mmc_of_parse(host->mmc);
 	if (ret) {
-		ret = dev_err_probe(dev, ret, "parsing dt failed.\n");
+		dev_err_probe(dev, ret, "parsing dt failed.\n");
 		goto unreg_clk;
 	}
 
-- 
2.51.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-10-21 11:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-20 13:22 [PATCH] mmc: sdhci-of-arasan: Omit a variable reassignment in sdhci_arasan_probe() Markus Elfring
2025-10-21  6:10 ` Michal Simek
2025-10-21 11:48 ` Ulf Hansson

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®