summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAndrei Epure <epure.andrei@gmail.com>2013-03-10 14:39:58 +0200
committerKalle Valo <kvalo@qca.qualcomm.com>2013-03-18 14:08:20 +0200
commita41d9a91e35f0ca7a55ecf3b6de5901e24d9e7ae (patch)
tree3e3eccda869c40b3d7b9885ab32a7012c615aa0c /drivers
parent6a3e4e06a1a2238d5a2668d4a5bad58fc92c7a77 (diff)
downloadlinux-a41d9a91e35f0ca7a55ecf3b6de5901e24d9e7ae.tar.gz
linux-a41d9a91e35f0ca7a55ecf3b6de5901e24d9e7ae.tar.bz2
linux-a41d9a91e35f0ca7a55ecf3b6de5901e24d9e7ae.zip
ath: changed kmalloc to kmemdup
Signed-off-by: Andrei Epure <epure.andrei@gmail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath6kl/usb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/usb.c b/drivers/net/wireless/ath/ath6kl/usb.c
index 63948f6c9f17..bed0d337712d 100644
--- a/drivers/net/wireless/ath/ath6kl/usb.c
+++ b/drivers/net/wireless/ath/ath6kl/usb.c
@@ -856,11 +856,9 @@ static int ath6kl_usb_submit_ctrl_out(struct ath6kl_usb *ar_usb,
int ret;
if (size > 0) {
- buf = kmalloc(size, GFP_KERNEL);
+ buf = kmemdup(data, size, GFP_KERNEL);
if (buf == NULL)
return -ENOMEM;
-
- memcpy(buf, data, size);
}
/* note: if successful returns number of bytes transfered */