aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/info.c
diff options
context:
space:
mode:
authorPaulo Marques <pmarques@grupopie.com>2005-06-23 03:09:02 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-23 12:45:18 -0400
commit543537bd922692bc978e2e356fcd8bfc9c2ee7d5 (patch)
tree0089e3907e7d6c17c01cffc6ea4a8962ed053079 /sound/core/info.c
parent991114c6fa6a21d1fa4d544abe78592352860c82 (diff)
[PATCH] create a kstrdup library function
This patch creates a new kstrdup library function and changes the "local" implementations in several places to use this function. Most of the changes come from the sound and net subsystems. The sound part had already been acknowledged by Takashi Iwai and the net part by David S. Miller. I left UML alone for now because I would need more time to read the code carefully before making changes there. Signed-off-by: Paulo Marques <pmarques@grupopie.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound/core/info.c')
-rw-r--r--sound/core/info.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/core/info.c b/sound/core/info.c
index 31faffe01cb0..5e122bbe7c92 100644
--- a/sound/core/info.c
+++ b/sound/core/info.c
@@ -24,6 +24,7 @@
24#include <linux/vmalloc.h> 24#include <linux/vmalloc.h>
25#include <linux/time.h> 25#include <linux/time.h>
26#include <linux/smp_lock.h> 26#include <linux/smp_lock.h>
27#include <linux/string.h>
27#include <sound/core.h> 28#include <sound/core.h>
28#include <sound/minors.h> 29#include <sound/minors.h>
29#include <sound/info.h> 30#include <sound/info.h>
@@ -754,7 +755,7 @@ static snd_info_entry_t *snd_info_create_entry(const char *name)
754 entry = kcalloc(1, sizeof(*entry), GFP_KERNEL); 755 entry = kcalloc(1, sizeof(*entry), GFP_KERNEL);
755 if (entry == NULL) 756 if (entry == NULL)
756 return NULL; 757 return NULL;
757 entry->name = snd_kmalloc_strdup(name, GFP_KERNEL); 758 entry->name = kstrdup(name, GFP_KERNEL);
758 if (entry->name == NULL) { 759 if (entry->name == NULL) {
759 kfree(entry); 760 kfree(entry);
760 return NULL; 761 return NULL;