Skip to contentSkip to conversation

ASoC: dapm: Refactor the code in snd_soc_dapm_new_pcm

PATCH Superseded anish kumar 2 participants 2 messages Aug 26, 2017 – Sep 20, 2017

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 2/4 ASoC: dapm: Refactor the code in snd_soc_dapm_new_pcm

refactor snd_soc_dapm_new_pcm to reduce the size of this function to facilitate further refactoring.

---
 sound/soc/soc-dapm.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
sound/soc/soc-dapm.c +4 -8
index 6e10a9a..1687c8a 100644
@@ -3821,19 +3821,15 @@ int snd_soc_dapm_new_pcm(struct snd_soc_card *card,
 				devm_kasprintf(card->dev, GFP_KERNEL,
 					       "Anonymous Configuration %d",
 					       count);
-			if (!w_param_text[count]) {
-				ret = -ENOMEM;
-				goto outfree_link_name;
-			}
 		} else {
 			w_param_text[count] = devm_kmemdup(card->dev,
 						config->stream_name,
 						strlen(config->stream_name) + 1,
 						GFP_KERNEL);
-			if (!w_param_text[count]) {
-				ret = -ENOMEM;
-				goto outfree_link_name;
-			}
+		}
+		if (!w_param_text[count]) {
+			ret = -ENOMEM;
+			goto outfree_link_name;
 		}
 		config++;
 	}
Signature · 1 line
2.10.1 (Apple Git-78)
maintainer
#1 lore raw

Applied "ASoC: dapm: Refactor the code in snd_soc_dapm_new_pcm" to the asoc tree

The patch

ASoC: dapm: Refactor the code in snd_soc_dapm_new_pcm

has been applied to the asoc tree at

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

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

Quoted 1 line

From 38b8e6f092fd71eee56a064487be335226b0a54d Mon Sep 17 00:00:00 2001

From: anish kumar <[email protected]>
Date: Wed, 20 Sep 2017 01:28:34 -0700
Subject: [PATCH] ASoC: dapm: Refactor the code in snd_soc_dapm_new_pcm

refactor snd_soc_dapm_new_pcm to reduce the size of this function to facilitate further refactoring.

---
 sound/soc/soc-dapm.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
sound/soc/soc-dapm.c +4 -8
index f51f61340f9c..d55cac655195 100644
@@ -3821,19 +3821,15 @@ int snd_soc_dapm_new_pcm(struct snd_soc_card *card,
 				devm_kasprintf(card->dev, GFP_KERNEL,
 					       "Anonymous Configuration %d",
 					       count);
-			if (!w_param_text[count]) {
-				ret = -ENOMEM;
-				goto outfree_link_name;
-			}
 		} else {
 			w_param_text[count] = devm_kmemdup(card->dev,
 						config->stream_name,
 						strlen(config->stream_name) + 1,
 						GFP_KERNEL);
-			if (!w_param_text[count]) {
-				ret = -ENOMEM;
-				goto outfree_link_name;
-			}
+		}
+		if (!w_param_text[count]) {
+			ret = -ENOMEM;
+			goto outfree_link_name;
 		}
 		config++;
 	}
Signature · 1 line
2.13.2