From: Thomas Reitmayr Date: Tue, 15 May 2007 09:47:48 +0000 (+0200) Subject: [ALSA] usbaudio - Coping with short replies in usbmixer X-Git-Tag: v2.6.22-rc2~65^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a04395ead6d17c83da64264b6fe78f852a648202;p=linux-2.6 [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: Thomas Reitmayr Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- diff --git a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c index 7b3bf3545a..325d4b6b54 100644 --- a/sound/usb/usbmixer.c +++ b/sound/usb/usbmixer.c @@ -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; }