diff options
| -rw-r--r-- | sound/core/timer.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/core/timer.c b/sound/core/timer.c index 51d1e3b03..9ef7e0726 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -1984,14 +1984,16 @@ static ssize_t snd_timer_user_read(struct file *file, char __user *buffer, mutex_lock(&tu->ioctl_lock); if (tu->tread) { if (copy_to_user(buffer, &tu->tqueue[qhead], - sizeof(struct snd_timer_tread))) + sizeof(struct snd_timer_tread))) { mutex_unlock(&tu->ioctl_lock); err = -EFAULT; + } } else { if (copy_to_user(buffer, &tu->queue[qhead], - sizeof(struct snd_timer_read))) + sizeof(struct snd_timer_read))) { mutex_unlock(&tu->ioctl_lock); err = -EFAULT; + } } mutex_unlock(&tu->ioctl_lock); |
