[alsa-devel] [PATCH] Coping with short replies in usbmixer
Thomas Reitmayr
thomas at devbase.at
Mon May 14 19:54:34 CEST 2007
Hi,
here is it again and signed off.
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: Thomas Reitmayr <thomas at devbase.at>
---
sound/usb/usbmixer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -rup a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c
--- a/sound/usb/usbmixer.c 2007-05-11 21:58:33.000000000 +0200
+++ b/sound/usb/usbmixer.c 2007-05-11 21:59:14.000000000 +0200
@@ -360,7 +360,7 @@ static int get_ctl_value(struct usb_mixe
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;
}
More information about the Alsa-devel
mailing list