mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH][next] ASoC: soc-core: remove redundant assignment to variable ret
@ 2024-12-17 17:11 Colin Ian King
  2024-12-17 20:52 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2024-12-17 17:11 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai, linux-sound
  Cc: kernel-janitors, linux-kernel

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@gmail.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


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

* Re: [PATCH][next] ASoC: soc-core: remove redundant assignment to variable ret
  2024-12-17 17:11 [PATCH][next] ASoC: soc-core: remove redundant assignment to variable ret Colin Ian King
@ 2024-12-17 20:52 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2024-12-17 20:52 UTC (permalink / raw)
  To: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, linux-sound,
	Colin Ian King
  Cc: kernel-janitors, linux-kernel

On Tue, 17 Dec 2024 17:11:51 +0000, Colin Ian King wrote:
> 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.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: soc-core: remove redundant assignment to variable ret
      commit: d349fd151f1aeb0d8aea4a2f0fe9ba24309609ed

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


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

end of thread, other threads:[~2024-12-17 20:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-17 17:11 [PATCH][next] ASoC: soc-core: remove redundant assignment to variable ret Colin Ian King
2024-12-17 20: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

all inboxes | Powered by JetHome®