alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Reitmayr <thomas@devbase.at>
To: alsa-devel@alsa-project.org
Subject: Re: [PATCH] Coping with short replies in usbmixer
Date: Mon, 14 May 2007 19:54:34 +0200	[thread overview]
Message-ID: <1179165274.10762.12.camel@tomcom.at.home> (raw)

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;
 		}

             reply	other threads:[~2007-05-14 17:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-14 17:54 Thomas Reitmayr [this message]
2007-05-15 10:40 ` [PATCH] Coping with short replies in usbmixer Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2007-05-11 20:28 thomas
2007-05-14  9:10 ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1179165274.10762.12.camel@tomcom.at.home \
    --to=thomas@devbase.at \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).