diff options
Diffstat (limited to 'drivers/net/wireless/rtlwifi/usb.c')
-rw-r--r-- | drivers/net/wireless/rtlwifi/usb.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c index 156b52732f3d..b5c80b5d57ef 100644 --- a/drivers/net/wireless/rtlwifi/usb.c +++ b/drivers/net/wireless/rtlwifi/usb.c | |||
@@ -224,10 +224,9 @@ static void _usb_writeN_sync(struct rtl_priv *rtlpriv, u32 addr, void *data, | |||
224 | u8 *buffer; | 224 | u8 *buffer; |
225 | 225 | ||
226 | wvalue = (u16)(addr & 0x0000ffff); | 226 | wvalue = (u16)(addr & 0x0000ffff); |
227 | buffer = kmalloc(len, GFP_ATOMIC); | 227 | buffer = kmemdup(data, len, GFP_ATOMIC); |
228 | if (!buffer) | 228 | if (!buffer) |
229 | return; | 229 | return; |
230 | memcpy(buffer, data, len); | ||
231 | usb_control_msg(udev, pipe, request, reqtype, wvalue, | 230 | usb_control_msg(udev, pipe, request, reqtype, wvalue, |
232 | index, buffer, len, 50); | 231 | index, buffer, len, 50); |
233 | 232 | ||