aboutsummaryrefslogtreecommitdiff
path: root/sound/usb/usx2y/us122l.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/usb/usx2y/us122l.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/usb/usx2y/us122l.c')
-rw-r--r--sound/usb/usx2y/us122l.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sound/usb/usx2y/us122l.c b/sound/usb/usx2y/us122l.c
index 98276aafefe..012ff1f6f8a 100644
--- a/sound/usb/usx2y/us122l.c
+++ b/sound/usb/usx2y/us122l.c
@@ -349,14 +349,10 @@ static int usb_stream_hwdep_ioctl(struct snd_hwdep *hw, struct file *file,
if (cmd != SNDRV_USB_STREAM_IOCTL_SET_PARAMS)
return -ENOTTY;
- cfg = kmalloc(sizeof(*cfg), GFP_KERNEL);
- if (!cfg)
- return -ENOMEM;
+ cfg = memdup_user((void *)arg, sizeof(*cfg));
+ if (IS_ERR(cfg))
+ return PTR_ERR(cfg);
- if (copy_from_user(cfg, (void *)arg, sizeof(*cfg))) {
- err = -EFAULT;
- goto free;
- }
if (cfg->version != USB_STREAM_INTERFACE_VERSION) {
err = -ENXIO;
goto free;