Commit c688e954 authored by Jaroslav Kysela's avatar Jaroslav Kysela

[ALSA] Fix ioctl arguments

RawMidi Midlevel
Fixed the wrong pointer types passed to get_user() for
DROP and DRAIN ioctls.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent f880c9c9
......@@ -747,7 +747,7 @@ static inline int _snd_rawmidi_ioctl(struct inode *inode, struct file *file,
case SNDRV_RAWMIDI_IOCTL_DROP:
{
int val;
if (get_user(val, (long __user *) argp))
if (get_user(val, (int __user *) argp))
return -EFAULT;
switch (val) {
case SNDRV_RAWMIDI_STREAM_OUTPUT:
......@@ -761,7 +761,7 @@ static inline int _snd_rawmidi_ioctl(struct inode *inode, struct file *file,
case SNDRV_RAWMIDI_IOCTL_DRAIN:
{
int val;
if (get_user(val, (long __user *) argp))
if (get_user(val, (int __user *) argp))
return -EFAULT;
switch (val) {
case SNDRV_RAWMIDI_STREAM_OUTPUT:
......
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