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>
This commit is contained in:
Andrei Epure 2013-03-10 15:09:47 +02:00 committed by John W. Linville
parent 60c46bf817
commit 7c21bb6996
1 changed files with 1 additions and 2 deletions

View File

@ -224,10 +224,9 @@ static void _usb_writeN_sync(struct rtl_priv *rtlpriv, u32 addr, void *data,
u8 *buffer;
wvalue = (u16)(addr & 0x0000ffff);
buffer = kmalloc(len, GFP_ATOMIC);
buffer = kmemdup(data, len, GFP_ATOMIC);
if (!buffer)
return;
memcpy(buffer, data, len);
usb_control_msg(udev, pipe, request, reqtype, wvalue,
index, buffer, len, 50);