Skip to contentSkip to conversation

ASoC: soc-core: use GFP_KERNEL flag for kmalloc in snd_soc_cnew

PATCH Applied Axel Lin 3 participants 3 messages Aug 20, 2011 – Aug 22, 2011

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 ASoC: soc-core: use GFP_KERNEL flag for kmalloc in snd_soc_cnew

GFP_ATOMIC is not needed here, use GFP_KERNEL instead.

---
 sound/soc/soc-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/soc-core.c +1 -1
index ae93aa8..b6d8716 100644
@@ -1913,7 +1913,7 @@ struct snd_kcontrol *snd_soc_cnew(const struct snd_kcontrol_new *_template,
 
 	if (prefix) {
 		name_len = strlen(long_name) + strlen(prefix) + 2;
-		name = kmalloc(name_len, GFP_ATOMIC);
+		name = kmalloc(name_len, GFP_KERNEL);
 		if (!name)
 			return NULL;
 
Signature · 1 line
1.7.4.1
Acked-by on v1 1/1
#1 lore raw
Quoted 12 lines · Axel Lin

GFP_ATOMIC is not needed here, use GFP_KERNEL instead.

---
 sound/soc/soc-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/soc-core.c +0 -0
index ae93aa8..b6d8716 100644

sound/soc/soc-core.c struct snd_kcontrol *snd_soc_cnew(const struct snd_kcontrol_new *_template, · line 1919

Quoted 8 lines
sound/soc/soc-core.c +1 -1
@@ -1913,7 +1913,7 @@ struct snd_kcontrol *snd_soc_cnew(const struct snd_kcontrol_new *_template,
 
 	if (prefix) {
 		name_len = strlen(long_name) + strlen(prefix) + 2;
-		name = kmalloc(name_len, GFP_ATOMIC);
+		name = kmalloc(name_len, GFP_KERNEL);
 		if (!name)
 			return NULL;