Re: [alsa-devel] [PATCH] Coping with short replies in usbmixer
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@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; }
At Mon, 14 May 2007 19:54:34 +0200, Thomas Reitmayr wrote:
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@devbase.at
Thanks, now applied to ALSA tree.
Takashi
participants (2)
-
Takashi Iwai
-
Thomas Reitmayr