Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=94d433630a1e63d383d592d488f60581e0d98190
Commit:     94d433630a1e63d383d592d488f60581e0d98190
Parent:     cadf1855e9f97d3f6857a168e1e7798fe27530a1
Author:     Russ Dill <[EMAIL PROTECTED]>
AuthorDate: Wed Jan 9 21:32:07 2008 -0700
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Sat Jan 12 17:43:19 2008 -0500

    [usb netdev] asix: fix regression
    
    51bf2976b55d07f9daae9697a0a3ac9f58abcedc caused a regression in the asix
    usbnet driver. usb_control_msg returns the number of bytes read on
    success, not 0. Tested with NETGEAR FA120.
    
    Signed-off-by: Russ Dill <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/usb/asix.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
index 1249f44..569028b 100644
--- a/drivers/net/usb/asix.c
+++ b/drivers/net/usb/asix.c
@@ -202,10 +202,10 @@ static int asix_read_cmd(struct usbnet *dev, u8 cmd, u16 
value, u16 index,
                buf,
                size,
                USB_CTRL_GET_TIMEOUT);
-       if (err >= 0 && err < size)
-               err = -EINVAL;
-       if (!err)
+       if (err == size)
                memcpy(data, buf, size);
+       else if (err >= 0)
+               err = -EINVAL;
        kfree(buf);
 
 out:
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to