提交 a04395ea 编写于 作者: T Thomas Reitmayr 提交者: Jaroslav Kysela

[ALSA] usbaudio - Coping with short replies in usbmixer

This patch makes sure that short USB replies are treated as an
error when requesting the value of a certain mixer control.
Signed-off-by: NThomas Reitmayr <thomas@devbase.at>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
Signed-off-by: NJaroslav Kysela <perex@suse.cz>
上级 8286c53e
......@@ -360,7 +360,7 @@ static int get_ctl_value(struct usb_mixer_elem_info *cval, int request, int vali
request,
USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN,
validx, cval->mixer->ctrlif | (cval->id << 8),
buf, val_len, 100) >= 0) {
buf, val_len, 100) >= val_len) {
*value_ret = convert_signed_value(cval, snd_usb_combine_bytes(buf, val_len));
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册