diff options
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_usb.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c index 58236e6d0921..9b1a26a4435b 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zd1211rw/zd_usb.c | |||
@@ -1671,6 +1671,10 @@ static void iowrite16v_urb_complete(struct urb *urb) | |||
1671 | 1671 | ||
1672 | if (urb->status && !usb->cmd_error) | 1672 | if (urb->status && !usb->cmd_error) |
1673 | usb->cmd_error = urb->status; | 1673 | usb->cmd_error = urb->status; |
1674 | |||
1675 | if (!usb->cmd_error && | ||
1676 | urb->actual_length != urb->transfer_buffer_length) | ||
1677 | usb->cmd_error = -EIO; | ||
1674 | } | 1678 | } |
1675 | 1679 | ||
1676 | static int zd_submit_waiting_urb(struct zd_usb *usb, bool last) | 1680 | static int zd_submit_waiting_urb(struct zd_usb *usb, bool last) |
@@ -1805,7 +1809,7 @@ int zd_usb_iowrite16v_async(struct zd_usb *usb, const struct zd_ioreq16 *ioreqs, | |||
1805 | usb_fill_int_urb(urb, udev, usb_sndintpipe(udev, EP_REGS_OUT), | 1809 | usb_fill_int_urb(urb, udev, usb_sndintpipe(udev, EP_REGS_OUT), |
1806 | req, req_len, iowrite16v_urb_complete, usb, | 1810 | req, req_len, iowrite16v_urb_complete, usb, |
1807 | ep->desc.bInterval); | 1811 | ep->desc.bInterval); |
1808 | urb->transfer_flags |= URB_FREE_BUFFER | URB_SHORT_NOT_OK; | 1812 | urb->transfer_flags |= URB_FREE_BUFFER; |
1809 | 1813 | ||
1810 | /* Submit previous URB */ | 1814 | /* Submit previous URB */ |
1811 | r = zd_submit_waiting_urb(usb, false); | 1815 | r = zd_submit_waiting_urb(usb, false); |