diff options
Diffstat (limited to 'sound/isa/wavefront/wavefront_synth.c')
-rw-r--r-- | sound/isa/wavefront/wavefront_synth.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sound/isa/wavefront/wavefront_synth.c b/sound/isa/wavefront/wavefront_synth.c index beb312cca75b..5d4ff48c4345 100644 --- a/sound/isa/wavefront/wavefront_synth.c +++ b/sound/isa/wavefront/wavefront_synth.c | |||
@@ -1664,12 +1664,11 @@ snd_wavefront_synth_ioctl (struct snd_hwdep *hw, struct file *file, | |||
1664 | break; | 1664 | break; |
1665 | 1665 | ||
1666 | case WFCTL_WFCMD: | 1666 | case WFCTL_WFCMD: |
1667 | wc = kmalloc(sizeof(*wc), GFP_KERNEL); | 1667 | wc = memdup_user(argp, sizeof(*wc)); |
1668 | if (! wc) | 1668 | if (IS_ERR(wc)) |
1669 | return -ENOMEM; | 1669 | return PTR_ERR(wc); |
1670 | if (copy_from_user (wc, argp, sizeof (*wc))) | 1670 | |
1671 | err = -EFAULT; | 1671 | if (wavefront_synth_control (acard, wc) < 0) |
1672 | else if (wavefront_synth_control (acard, wc) < 0) | ||
1673 | err = -EIO; | 1672 | err = -EIO; |
1674 | else if (copy_to_user (argp, wc, sizeof (*wc))) | 1673 | else if (copy_to_user (argp, wc, sizeof (*wc))) |
1675 | err = -EFAULT; | 1674 | err = -EFAULT; |