Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] ASoC: rockchip: i2s-tdm: Omit a variable reassignment in rockchip_i2s_tdm_probe()
@ 2025-10-20 16:23 Markus Elfring
  2025-10-21 18:52 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Markus Elfring @ 2025-10-20 16:23 UTC (permalink / raw)
  To: linux-sound, linux-rockchip, linux-arm-kernel, Colin Ian King,
	Heiko Stübner, Jaroslav Kysela, Liam Girdwood, Mark Brown,
	Nicolas Frattaroli, Takashi Iwai
  Cc: LKML, Anand Moon, Christophe Jaillet, Colin Ian King

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 20 Oct 2025 18:11:58 +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>
---
 sound/soc/rockchip/rockchip_i2s_tdm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/rockchip/rockchip_i2s_tdm.c b/sound/soc/rockchip/rockchip_i2s_tdm.c
index d9a1fab7f403..770b9bfbb384 100644
--- a/sound/soc/rockchip/rockchip_i2s_tdm.c
+++ b/sound/soc/rockchip/rockchip_i2s_tdm.c
@@ -1337,8 +1337,7 @@ static int rockchip_i2s_tdm_probe(struct platform_device *pdev)
 
 	ret = i2s_tdm_prepare_enable_mclk(i2s_tdm);
 	if (ret) {
-		ret = dev_err_probe(i2s_tdm->dev, ret,
-				    "Failed to enable one or more mclks\n");
+		dev_err_probe(i2s_tdm->dev, ret, "Failed to enable one or more mclks\n");
 		goto err_disable_hclk;
 	}
 
-- 
2.51.1


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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-20 16:23 [PATCH] ASoC: rockchip: i2s-tdm: Omit a variable reassignment in rockchip_i2s_tdm_probe() Markus Elfring
2025-10-21 18:52 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox