aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core/misc.c')
-rw-r--r--sound/core/misc.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sound/core/misc.c b/sound/core/misc.c
index 1a81fe4df218..b53e563c09e6 100644
--- a/sound/core/misc.c
+++ b/sound/core/misc.c
@@ -23,17 +23,15 @@
23#include <linux/init.h> 23#include <linux/init.h>
24#include <linux/sched.h> 24#include <linux/sched.h>
25#include <linux/time.h> 25#include <linux/time.h>
26#include <linux/ioport.h>
26#include <sound/core.h> 27#include <sound/core.h>
27 28
28int snd_task_name(struct task_struct *task, char *name, size_t size) 29void release_and_free_resource(struct resource *res)
29{ 30{
30 unsigned int idx; 31 if (res) {
31 32 release_resource(res);
32 snd_assert(task != NULL && name != NULL && size >= 2, return -EINVAL); 33 kfree(res);
33 for (idx = 0; idx < sizeof(task->comm) && idx + 1 < size; idx++) 34 }
34 name[idx] = task->comm[idx];
35 name[idx] = '\0';
36 return 0;
37} 35}
38 36
39#ifdef CONFIG_SND_VERBOSE_PRINTK 37#ifdef CONFIG_SND_VERBOSE_PRINTK