diff options
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/pcm_native.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 61f5d425b630..c49b9d9e303c 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
23 | #include <linux/file.h> | 23 | #include <linux/file.h> |
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | #include <linux/smp_lock.h> | ||
25 | #include <linux/time.h> | 26 | #include <linux/time.h> |
26 | #include <linux/pm_qos_params.h> | 27 | #include <linux/pm_qos_params.h> |
27 | #include <linux/uio.h> | 28 | #include <linux/uio.h> |
@@ -3249,14 +3250,17 @@ static int snd_pcm_fasync(int fd, struct file * file, int on) | |||
3249 | struct snd_pcm_file * pcm_file; | 3250 | struct snd_pcm_file * pcm_file; |
3250 | struct snd_pcm_substream *substream; | 3251 | struct snd_pcm_substream *substream; |
3251 | struct snd_pcm_runtime *runtime; | 3252 | struct snd_pcm_runtime *runtime; |
3252 | int err; | 3253 | int err = -ENXIO; |
3253 | 3254 | ||
3255 | lock_kernel(); | ||
3254 | pcm_file = file->private_data; | 3256 | pcm_file = file->private_data; |
3255 | substream = pcm_file->substream; | 3257 | substream = pcm_file->substream; |
3256 | snd_assert(substream != NULL, return -ENXIO); | 3258 | snd_assert(substream != NULL, goto out); |
3257 | runtime = substream->runtime; | 3259 | runtime = substream->runtime; |
3258 | 3260 | ||
3259 | err = fasync_helper(fd, file, on, &runtime->fasync); | 3261 | err = fasync_helper(fd, file, on, &runtime->fasync); |
3262 | out: | ||
3263 | unlock_kernel(); | ||
3260 | if (err < 0) | 3264 | if (err < 0) |
3261 | return err; | 3265 | return err; |
3262 | return 0; | 3266 | return 0; |