Skip to content

Commit

Permalink
[ALSA] usbaudio - Coping with short replies in usbmixer
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
  • Loading branch information
Thomas Reitmayr authored and Jaroslav Kysela committed May 16, 2007
1 parent 8286c53 commit a04395e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/usb/usbmixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit a04395e

Please sign in to comment.