aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/zd1201.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/zd1201.c')
-rw-r--r--drivers/net/wireless/zd1201.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c
index 4941f201d6c8..b8ba1f925e75 100644
--- a/drivers/net/wireless/zd1201.c
+++ b/drivers/net/wireless/zd1201.c
@@ -98,10 +98,12 @@ static int zd1201_fw_upload(struct usb_device *dev, int apfw)
98 goto exit; 98 goto exit;
99 99
100 err = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), 0x4, 100 err = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), 0x4,
101 USB_DIR_IN | 0x40, 0,0, &ret, sizeof(ret), ZD1201_FW_TIMEOUT); 101 USB_DIR_IN | 0x40, 0, 0, buf, sizeof(ret), ZD1201_FW_TIMEOUT);
102 if (err < 0) 102 if (err < 0)
103 goto exit; 103 goto exit;
104 104
105 memcpy(&ret, buf, sizeof(ret));
106
105 if (ret & 0x80) { 107 if (ret & 0x80) {
106 err = -EIO; 108 err = -EIO;
107 goto exit; 109 goto exit;