aboutsummaryrefslogtreecommitdiff
path: root/sound/core/timer.c
diff options
context:
space:
mode:
authorMoyster <oysterized@gmail.com>2018-11-29 13:51:22 +0100
committerMoyster <oysterized@gmail.com>2018-11-29 13:51:22 +0100
commit119c933eb8a183373fd815b03c18cdf196514501 (patch)
treeab2f401e14e98785d7084e6e136dd828a1df5ffa /sound/core/timer.c
parent8578d920ae51ce4555bd544568e1ed83bb66f00f (diff)
sound: core: fix warning: this 'if' clause does not guard...
[-Wmisleading-indentation] in function 'snd_timer_user_read' /home/oyster/Github/android_kernel_m2note/sound/core/timer.c: In function 'snd_timer_user_read': /home/oyster/Github/android_kernel_m2note/sound/core/timer.c:1986:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if (copy_to_user(buffer, &tu->tqueue[qhead], ^~ /home/oyster/Github/android_kernel_m2note/sound/core/timer.c:1989:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' err = -EFAULT; ^~~ /home/oyster/Github/android_kernel_m2note/sound/core/timer.c:1991:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if (copy_to_user(buffer, &tu->queue[qhead], ^~ /home/oyster/Github/android_kernel_m2note/sound/core/timer.c:1994:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' err = -EFAULT; ^~~
Diffstat (limited to 'sound/core/timer.c')
-rw-r--r--sound/core/timer.c6
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);