From: Markus Elfring <Markus.Elfring@web.de>
To: linux-sound@vger.kernel.org, linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
"Colin Ian King" <colin.king@canonical.com>,
"Heiko Stübner" <heiko@sntech.de>,
"Jaroslav Kysela" <perex@perex.cz>,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Mark Brown" <broonie@kernel.org>,
"Nicolas Frattaroli" <frattaroli.nicolas@gmail.com>,
"Takashi Iwai" <tiwai@suse.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Anand Moon <linux.amoon@gmail.com>,
Christophe Jaillet <christophe.jaillet@wanadoo.fr>,
Colin Ian King <colin.i.king@gmail.com>
Subject: [PATCH] ASoC: rockchip: i2s-tdm: Omit a variable reassignment in rockchip_i2s_tdm_probe()
Date: Mon, 20 Oct 2025 18:23:27 +0200 [thread overview]
Message-ID: <115fba03-e8ba-4bc1-84d8-7d483c06208c@web.de> (raw)
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
next reply other threads:[~2025-10-20 16:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-20 16:23 Markus Elfring [this message]
2025-10-21 18:52 ` [PATCH] ASoC: rockchip: i2s-tdm: Omit a variable reassignment in rockchip_i2s_tdm_probe() Mark Brown
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=115fba03-e8ba-4bc1-84d8-7d483c06208c@web.de \
--to=markus.elfring@web.de \
--cc=broonie@kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=colin.i.king@gmail.com \
--cc=colin.king@canonical.com \
--cc=frattaroli.nicolas@gmail.com \
--cc=heiko@sntech.de \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux.amoon@gmail.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.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