[PATCH] ASoC: rockchip: i2s-tdm: Omit a variable reassignment in rockchip_i2s_tdm_probe()
Markus Elfring
Markus.Elfring at web.de
Mon Oct 20 09:23:27 PDT 2025
From: Markus Elfring <elfring at 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 at 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
More information about the linux-arm-kernel
mailing list