aboutsummaryrefslogtreecommitdiff
path: root/sound/isa/wavefront/wavefront_synth.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-04-15 09:11:11 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-15 09:11:11 -0700
commit3ee8da87ba6151ec91b2b8bbd27633bb248ea0d5 (patch)
treea348efdfe8f607583dd61bf75e1b5d077c92a4a0 /sound/isa/wavefront/wavefront_synth.c
parenta2c252ebdeaab28c9b400570594d576dae295958 (diff)
parent9dd175f7d2db1826c891855d3d150da3a5792e94 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: hda - Fix the cmd cache keys for amp verbs ALSA: add missing definitions(letters) to HD-Audio.txt ALSA: hda - Add quirk mask for Fujitsu Amilo laptops with ALC883 [ALSA] intel8x0: add one retry to the ac97_clock measurement routine [ALSA] intel8x0: fix wrong conditions in ac97_clock measure routine ALSA: hda - Avoid call of snd_jack_report at release ALSA: add private_data to struct snd_jack ALSA: snd-usb-caiaq: rename files to remove redundant information in file pathes ALSA: snd-usb-caiaq: clean up header includes ALSA: sound/pci: use memdup_user() ALSA: sound/usb: use memdup_user() ALSA: sound/isa: use memdup_user() ALSA: sound/core: use memdup_user() [ALSA] intel8x0: do not use zero value from PICB register [ALSA] intel8x0: an attempt to make ac97_clock measurement more reliable [ALSA] pcm-midlevel: Add more strict buffer position checks based on jiffies [ALSA] hda_intel: fix unexpected ring buffer positions ASoC: Disable S3C64xx support in Kconfig ASoC: magician: remove un-necessary #include of pxa-regs.h and hardware.h
Diffstat (limited to 'sound/isa/wavefront/wavefront_synth.c')
-rw-r--r--sound/isa/wavefront/wavefront_synth.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sound/isa/wavefront/wavefront_synth.c b/sound/isa/wavefront/wavefront_synth.c
index beb312cca75..5d4ff48c434 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,
break;
case WFCTL_WFCMD:
- wc = kmalloc(sizeof(*wc), GFP_KERNEL);
- if (! wc)
- return -ENOMEM;
- if (copy_from_user (wc, argp, sizeof (*wc)))
- err = -EFAULT;
- else if (wavefront_synth_control (acard, wc) < 0)
+ wc = memdup_user(argp, sizeof(*wc));
+ if (IS_ERR(wc))
+ return PTR_ERR(wc);
+
+ if (wavefront_synth_control (acard, wc) < 0)
err = -EIO;
else if (copy_to_user (argp, wc, sizeof (*wc)))
err = -EFAULT;