Commit 3aab2a32 authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update

ALSA sequencer
Fixed the bad check on copy_from_user() return value
Signed-off-by: default avatarMika Kukkonen <mika@osdl.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 0a2e4c93
......@@ -95,7 +95,7 @@ int snd_seq_dump_var_event(const snd_seq_event_t *event, snd_seq_dump_func_t fun
int size = sizeof(buf);
if (len < size)
size = len;
if (copy_from_user(buf, curptr, size) < 0)
if (copy_from_user(buf, curptr, size))
return -EFAULT;
err = func(private_data, buf, size);
if (err < 0)
......@@ -158,7 +158,7 @@ int snd_seq_expand_var_event(const snd_seq_event_t *event, int count, char *buf,
if (event->data.ext.len & SNDRV_SEQ_EXT_USRPTR) {
if (! in_kernel)
return -EINVAL;
if (copy_from_user(buf, event->data.ext.ptr, len) < 0)
if (copy_from_user(buf, event->data.ext.ptr, len))
return -EFAULT;
return newlen;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment