diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-21 11:53:00 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-21 11:53:00 -0800 |
commit | a2a6937da0b95644008ede0eb309493d16cf2ac2 (patch) | |
tree | 6950882662b3cbe9c569720c5e173dd16b7f3c85 /sound/usb/line6/driver.c | |
parent | f5e25f0db07ee6d083d6376c400ca1065a10fa1a (diff) | |
parent | 3cd1ce0420ce89937bef9096d5bdb13fbdf0f8b0 (diff) | |
download | op-kernel-dev-a2a6937da0b95644008ede0eb309493d16cf2ac2.zip op-kernel-dev-a2a6937da0b95644008ede0eb309493d16cf2ac2.tar.gz |
Merge tag 'sound-fix-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"Here are a few small fix patches for 3.20-rc1:
- Quirks for Denon and Lifecam USB-audio devices and HD-audio on HP
laptops
- A long-time regression fix for HDSP eMADI
- Add missing DRAIN_TRIGGER flag set for ASoC intel-sst
- Trivial fixes for sequencer core and HD-audio Tegra, a LINE6
cleanup"
* tag 'sound-fix-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: usb: Fix support for Denon DA-300USB DAC (ID 154e:1003)
ASoC: Intel: add SNDRV_PCM_INFO_DRAIN_TRIGGER flag
ALSA: usb-audio: Don't attempt to get Lifecam HD-5000 sample rate
ALSA: hda/tegra check correct return value from ioremap_resource
ALSA: hdspm - Constrain periods to 2 on older cards
ALSA: hda - enable mute led quirk for one more hp machine.
ALSA: seq: potential out of bounds in do_control()
ALSA: line6: Improve line6_read/write_data() interfaces
Diffstat (limited to 'sound/usb/line6/driver.c')
-rw-r--r-- | sound/usb/line6/driver.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sound/usb/line6/driver.c b/sound/usb/line6/driver.c index 99b63a7..81b7da8 100644 --- a/sound/usb/line6/driver.c +++ b/sound/usb/line6/driver.c @@ -302,14 +302,17 @@ static void line6_data_received(struct urb *urb) /* Read data from device. */ -int line6_read_data(struct usb_line6 *line6, int address, void *data, - size_t datalen) +int line6_read_data(struct usb_line6 *line6, unsigned address, void *data, + unsigned datalen) { struct usb_device *usbdev = line6->usbdev; int ret; unsigned char len; unsigned count; + if (address > 0xffff || datalen > 0xff) + return -EINVAL; + /* query the serial number: */ ret = usb_control_msg(usbdev, usb_sndctrlpipe(usbdev, 0), 0x67, USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT, @@ -370,14 +373,17 @@ EXPORT_SYMBOL_GPL(line6_read_data); /* Write data to device. */ -int line6_write_data(struct usb_line6 *line6, int address, void *data, - size_t datalen) +int line6_write_data(struct usb_line6 *line6, unsigned address, void *data, + unsigned datalen) { struct usb_device *usbdev = line6->usbdev; int ret; unsigned char status; int count; + if (address > 0xffff || datalen > 0xffff) + return -EINVAL; + ret = usb_control_msg(usbdev, usb_sndctrlpipe(usbdev, 0), 0x67, USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT, 0x0022, address, data, datalen, |