From: Takashi Iwai Date: Thu, 20 Nov 2014 20:39:14 +0000 (+0100) Subject: ALSA: usb-audio: Use snd_usb_ctl_msg() for Native Instruments quirk X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=01cb156edbbd4e6c4fd8db0d05f18c62c424f9aa;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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: Takashi Iwai --- diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c index 7c83bab69dee..8c9bf4b7aaf0 100644 --- a/sound/usb/mixer_quirks.c +++ b/sound/usb/mixer_quirks.c @@ -593,10 +593,10 @@ static int snd_nativeinstruments_control_get(struct snd_kcontrol *kcontrol, if (mixer->chip->shutdown) ret = -ENODEV; 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, 0, wIndex, - &tmp, sizeof(tmp), 1000); + &tmp, sizeof(tmp)); up_read(&mixer->chip->shutdown_rwsem); if (ret < 0) {