lkml.org 
[lkml]   [2017]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 1/5] ASoC: dapm: Delete error messages for a failed memory allocation in snd_soc_dapm_new_pcm()
From
Date
From: Markus Elfring <elfring@users.sourceforge.net>
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@users.sourceforge.net>
---
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
\
 
 \ /
  Last update: 2017-08-10 15:03    [W:0.032 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site