]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/isdn/mISDN/dsp_pipeline.c
Merge remote-tracking branch 'sound-current/for-linus'
[karo-tx-linux.git] / drivers / isdn / mISDN / dsp_pipeline.c
index 8b1a66c6ca8aa0e3c5a647945ba895172d3a4974..e72b4e73cd615f1fa0410b97661d7f07ef9bbaca 100644 (file)
@@ -235,7 +235,7 @@ void dsp_pipeline_destroy(struct dsp_pipeline *pipeline)
 
 int dsp_pipeline_build(struct dsp_pipeline *pipeline, const char *cfg)
 {
-       int len, incomplete = 0, found = 0;
+       int incomplete = 0, found = 0;
        char *dup, *tok, *name, *args;
        struct dsp_element_entry *entry, *n;
        struct dsp_pipeline_entry *pipeline_entry;
@@ -247,17 +247,9 @@ int dsp_pipeline_build(struct dsp_pipeline *pipeline, const char *cfg)
        if (!list_empty(&pipeline->list))
                _dsp_pipeline_destroy(pipeline);
 
-       if (!cfg)
-               return 0;
-
-       len = strlen(cfg);
-       if (!len)
-               return 0;
-
-       dup = kmalloc(len + 1, GFP_ATOMIC);
+       dup = kstrdup(cfg, GFP_ATOMIC);
        if (!dup)
                return 0;
-       strcpy(dup, cfg);
        while ((tok = strsep(&dup, "|"))) {
                if (!strlen(tok))
                        continue;