diff options
Diffstat (limited to 'drivers/net/wireless/rtlwifi/usb.c')
-rw-r--r-- | drivers/net/wireless/rtlwifi/usb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c index 29f0969e4ba0..f2ecdeb3a90d 100644 --- a/drivers/net/wireless/rtlwifi/usb.c +++ b/drivers/net/wireless/rtlwifi/usb.c | |||
@@ -210,17 +210,16 @@ static void _usb_writeN_sync(struct rtl_priv *rtlpriv, u32 addr, void *data, | |||
210 | u16 index = REALTEK_USB_VENQT_CMD_IDX; | 210 | u16 index = REALTEK_USB_VENQT_CMD_IDX; |
211 | int pipe = usb_sndctrlpipe(udev, 0); /* write_out */ | 211 | int pipe = usb_sndctrlpipe(udev, 0); /* write_out */ |
212 | u8 *buffer; | 212 | u8 *buffer; |
213 | dma_addr_t dma_addr; | ||
214 | 213 | ||
215 | wvalue = (u16)(addr&0x0000ffff); | 214 | wvalue = (u16)(addr & 0x0000ffff); |
216 | buffer = usb_alloc_coherent(udev, (size_t)len, GFP_ATOMIC, &dma_addr); | 215 | buffer = kmalloc(len, GFP_ATOMIC); |
217 | if (!buffer) | 216 | if (!buffer) |
218 | return; | 217 | return; |
219 | memcpy(buffer, data, len); | 218 | memcpy(buffer, data, len); |
220 | usb_control_msg(udev, pipe, request, reqtype, wvalue, | 219 | usb_control_msg(udev, pipe, request, reqtype, wvalue, |
221 | index, buffer, len, 50); | 220 | index, buffer, len, 50); |
222 | 221 | ||
223 | usb_free_coherent(udev, (size_t)len, buffer, dma_addr); | 222 | kfree(buffer); |
224 | } | 223 | } |
225 | 224 | ||
226 | static void _rtl_usb_io_handler_init(struct device *dev, | 225 | static void _rtl_usb_io_handler_init(struct device *dev, |
@@ -640,6 +639,7 @@ static int _rtl_usb_receive(struct ieee80211_hw *hw) | |||
640 | RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG, | 639 | RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG, |
641 | "Failed to prep_rx_urb!!\n"); | 640 | "Failed to prep_rx_urb!!\n"); |
642 | err = PTR_ERR(skb); | 641 | err = PTR_ERR(skb); |
642 | usb_free_urb(urb); | ||
643 | goto err_out; | 643 | goto err_out; |
644 | } | 644 | } |
645 | 645 | ||