From: Andrei Epure Date: Sun, 10 Mar 2013 12:39:58 +0000 (+0200) Subject: ath: changed kmalloc to kmemdup X-Git-Tag: v3.12-rc1~804^2~21^2^2~266^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a41d9a91e35f0ca7a55ecf3b6de5901e24d9e7ae;p=kernel%2Fkernel-generic.git ath: changed kmalloc to kmemdup Signed-off-by: Andrei Epure Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/ath/ath6kl/usb.c b/drivers/net/wireless/ath/ath6kl/usb.c index 63948f6..bed0d33 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 */