[PATCH 1/5] ASoC: dapm: Delete error messages for a failed memory allocation in snd_soc_dapm_new_pcm()
From: SF Markus Elfring
Date: Thu Aug 10 2017 - 09:03:22 EST
From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 10 Aug 2017 14:09:19 +0200
Omit extra messages for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
---
sound/soc/soc-dapm.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index dcef67a9bd48..3adb914bc009 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3854,8 +3854,6 @@ int snd_soc_dapm_new_pcm(struct snd_soc_card *card,
(void *)(kcontrol_dai_link[0].private_value),
sizeof(struct soc_enum), GFP_KERNEL);
if (!private_value) {
- dev_err(card->dev, "ASoC: Failed to create control for %s widget\n",
- link_name);
ret = -ENOMEM;
goto outfree_link_name;
}
@@ -3866,8 +3864,6 @@ int snd_soc_dapm_new_pcm(struct snd_soc_card *card,
sizeof(struct snd_kcontrol_new),
GFP_KERNEL);
if (!template.kcontrol_news) {
- dev_err(card->dev, "ASoC: Failed to create control for %s widget\n",
- link_name);
ret = -ENOMEM;
goto outfree_private_value;
}
--
2.14.0