aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi
diff options
context:
space:
mode:
authorAndrei Epure <epure.andrei@gmail.com>2013-03-10 09:09:47 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-03-11 15:06:14 -0400
commit7c21bb6996d40f6bb21a015392be41ebb0e538c2 (patch)
tree10ae716d3c64dd3a585ec987fa3767434b6e1df7 /drivers/net/wireless/rtlwifi
parent60c46bf8176bd4cf28314a8bf0cf26f2ddc3b793 (diff)
wireless:rtlwifi: replaced kmalloc+memcpy with kmemdup
Signed-off-by: Andrei Epure <epure.andrei@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi')
-rw-r--r--drivers/net/wireless/rtlwifi/usb.c3
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