diff options
Diffstat (limited to 'drivers/net/usb/asix.c')
-rw-r--r-- | 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 1249f444039e..569028b2baf2 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, | |||
202 | buf, | 202 | buf, |
203 | size, | 203 | size, |
204 | USB_CTRL_GET_TIMEOUT); | 204 | USB_CTRL_GET_TIMEOUT); |
205 | if (err >= 0 && err < size) | 205 | if (err == size) |
206 | err = -EINVAL; | ||
207 | if (!err) | ||
208 | memcpy(data, buf, size); | 206 | memcpy(data, buf, size); |
207 | else if (err >= 0) | ||
208 | err = -EINVAL; | ||
209 | kfree(buf); | 209 | kfree(buf); |
210 | 210 | ||
211 | out: | 211 | out: |