Commit 7c21bb69 authored by Andrei Epure's avatar Andrei Epure Committed by John W. Linville

wireless:rtlwifi: replaced kmalloc+memcpy with kmemdup

Signed-off-by: default avatarAndrei Epure <epure.andrei@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 60c46bf8
...@@ -224,10 +224,9 @@ static void _usb_writeN_sync(struct rtl_priv *rtlpriv, u32 addr, void *data, ...@@ -224,10 +224,9 @@ static void _usb_writeN_sync(struct rtl_priv *rtlpriv, u32 addr, void *data,
u8 *buffer; u8 *buffer;
wvalue = (u16)(addr & 0x0000ffff); wvalue = (u16)(addr & 0x0000ffff);
buffer = kmalloc(len, GFP_ATOMIC); buffer = kmemdup(data, len, GFP_ATOMIC);
if (!buffer) if (!buffer)
return; return;
memcpy(buffer, data, len);
usb_control_msg(udev, pipe, request, reqtype, wvalue, usb_control_msg(udev, pipe, request, reqtype, wvalue,
index, buffer, len, 50); index, buffer, len, 50);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment