aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/pcm_compat.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core/pcm_compat.c')
-rw-r--r--sound/core/pcm_compat.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sound/core/pcm_compat.c b/sound/core/pcm_compat.c
index 1f64ab0c2a95..10f537f4d735 100644
--- a/sound/core/pcm_compat.c
+++ b/sound/core/pcm_compat.c
@@ -27,17 +27,13 @@ static int snd_pcm_ioctl_delay_compat(struct snd_pcm_substream *substream,
27 s32 __user *src) 27 s32 __user *src)
28{ 28{
29 snd_pcm_sframes_t delay; 29 snd_pcm_sframes_t delay;
30 mm_segment_t fs;
31 int err;
32 30
33 fs = snd_enter_user(); 31 delay = snd_pcm_delay(substream);
34 err = snd_pcm_delay(substream, &delay); 32 if (delay < 0)
35 snd_leave_user(fs); 33 return delay;
36 if (err < 0)
37 return err;
38 if (put_user(delay, src)) 34 if (put_user(delay, src))
39 return -EFAULT; 35 return -EFAULT;
40 return err; 36 return 0;
41} 37}
42 38
43static int snd_pcm_ioctl_rewind_compat(struct snd_pcm_substream *substream, 39static int snd_pcm_ioctl_rewind_compat(struct snd_pcm_substream *substream,
@@ -680,6 +676,7 @@ static long snd_pcm_ioctl_compat(struct file *file, unsigned int cmd, unsigned l
680 case SNDRV_PCM_IOCTL_INFO: 676 case SNDRV_PCM_IOCTL_INFO:
681 case SNDRV_PCM_IOCTL_TSTAMP: 677 case SNDRV_PCM_IOCTL_TSTAMP:
682 case SNDRV_PCM_IOCTL_TTSTAMP: 678 case SNDRV_PCM_IOCTL_TTSTAMP:
679 case SNDRV_PCM_IOCTL_USER_PVERSION:
683 case SNDRV_PCM_IOCTL_HWSYNC: 680 case SNDRV_PCM_IOCTL_HWSYNC:
684 case SNDRV_PCM_IOCTL_PREPARE: 681 case SNDRV_PCM_IOCTL_PREPARE:
685 case SNDRV_PCM_IOCTL_RESET: 682 case SNDRV_PCM_IOCTL_RESET: