[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241217171151.354550-1-colin.i.king@gmail.com>
Date: Tue, 17 Dec 2024 17:11:51 +0000
From: Colin Ian King <colin.i.king@...il.com>
To: Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
linux-sound@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH][next] ASoC: soc-core: remove redundant assignment to variable ret
The variable ret is being assigned a zero value that is never read,
it is being re-assigned a new value from the return value from the
call to snd_soc_dapm_add_routes. The assignment is redundant and can
be removed.
Signed-off-by: Colin Ian King <colin.i.king@...il.com>
---
sound/soc/soc-core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index c8b7f78b02f0..710c278e4f36 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2228,25 +2228,24 @@ static int snd_soc_bind_card(struct snd_soc_card *card)
snd_soc_dapm_link_dai_widgets(card);
snd_soc_dapm_connect_dai_link_widgets(card);
ret = snd_soc_add_card_controls(card, card->controls,
card->num_controls);
if (ret < 0)
goto probe_end;
ret = snd_soc_dapm_add_routes(&card->dapm, card->dapm_routes,
card->num_dapm_routes);
if (ret < 0) {
if (card->disable_route_checks) {
- ret = 0;
dev_info(card->dev,
"%s: disable_route_checks set, ignoring errors on add_routes\n",
__func__);
} else {
dev_err(card->dev,
"%s: snd_soc_dapm_add_routes failed: %d\n",
__func__, ret);
goto probe_end;
}
}
ret = snd_soc_dapm_add_routes(&card->dapm, card->of_dapm_routes,
--
2.45.2
Powered by blists - more mailing lists