From: anish kumar <yesanishhere@gmail.com>
To: broonie@kernel.org
Cc: anish kumar <yesanishhere@gmail.com>,
alsa-devel@alsa-project.org, tiwai@suse.com, lgirdwood@gmail.com
Subject: [patch 2/4] ASoC: dapm: Refactor the code in snd_soc_dapm_new_pcm
Date: Sat, 26 Aug 2017 01:29:38 -0700 [thread overview]
Message-ID: <20170826082938.35516-1-yesanishhere@gmail.com> (raw)
refactor snd_soc_dapm_new_pcm to reduce the size of
this function to facilitate further refactoring.
Signed-off-by: anish kumar <yesanishhere@gmail.com>
---
sound/soc/soc-dapm.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 6e10a9a..1687c8a 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -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++;
}
--
2.10.1 (Apple Git-78)
next reply other threads:[~2017-08-26 8:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-26 8:29 anish kumar [this message]
2017-09-20 11:42 ` Applied "ASoC: dapm: Refactor the code in snd_soc_dapm_new_pcm" to the asoc tree Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2017-09-15 5:02 [PATCH 2/4] ASoC: dapm: Refactor the code in snd_soc_dapm_new_pcm anish kumar
2017-09-19 12:32 ` 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=20170826082938.35516-1-yesanishhere@gmail.com \
--to=yesanishhere@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).