Commit 01cb156e authored by Takashi Iwai's avatar Takashi Iwai

ALSA: usb-audio: Use snd_usb_ctl_msg() for Native Instruments quirk

snd_nativeinstruments_control_get() uses a stack as a buffer for
usb_control_msg(), but it's basically not allowed.  Replace the call
with a safer helper, snd_usb_ctl_msg(), instead.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 6676f308
...@@ -593,10 +593,10 @@ static int snd_nativeinstruments_control_get(struct snd_kcontrol *kcontrol, ...@@ -593,10 +593,10 @@ static int snd_nativeinstruments_control_get(struct snd_kcontrol *kcontrol,
if (mixer->chip->shutdown) if (mixer->chip->shutdown)
ret = -ENODEV; ret = -ENODEV;
else else
ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), bRequest, ret = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), bRequest,
USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
0, wIndex, 0, wIndex,
&tmp, sizeof(tmp), 1000); &tmp, sizeof(tmp));
up_read(&mixer->chip->shutdown_rwsem); up_read(&mixer->chip->shutdown_rwsem);
if (ret < 0) { if (ret < 0) {
......
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