Skip to content

Commit

Permalink
wireless:rtlwifi: replaced kmalloc+memcpy with kmemdup
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Epure <epure.andrei@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Andrei Epure authored and John W. Linville committed Mar 11, 2013
1 parent 60c46bf commit 7c21bb6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/wireless/rtlwifi/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 7c21bb6

Please sign in to comment.