diff options
author | Thomas Reitmayr <thomas@devbase.at> | 2007-05-15 11:47:48 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2007-05-16 12:23:20 +0200 |
commit | a04395ead6d17c83da64264b6fe78f852a648202 (patch) | |
tree | 74780939929e27939d2311c9ed64207435508e9a | |
parent | 8286c53e54b8b1b9489b4dd5d2d3a4f94b8c012e (diff) | |
download | linux-rpi-a04395ead6d17c83da64264b6fe78f852a648202.tar.gz linux-rpi-a04395ead6d17c83da64264b6fe78f852a648202.tar.bz2 linux-rpi-a04395ead6d17c83da64264b6fe78f852a648202.zip |
[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 <thomas@devbase.at>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
-rw-r--r-- | sound/usb/usbmixer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c index 7b3bf3545a3b..325d4b6b54aa 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; } |