提交 a41d9a91 编写于 作者: A Andrei Epure 提交者: Kalle Valo

ath: changed kmalloc to kmemdup

Signed-off-by: NAndrei Epure <epure.andrei@gmail.com>
Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
上级 6a3e4e06
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册