mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-06 17:43:43 +00:00
ath: changed kmalloc to kmemdup
Signed-off-by: Andrei Epure <epure.andrei@gmail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
This commit is contained in:
parent
6a3e4e06a1
commit
a41d9a91e3
@ -856,11 +856,9 @@ static int ath6kl_usb_submit_ctrl_out(struct ath6kl_usb *ar_usb,
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (size > 0) {
|
if (size > 0) {
|
||||||
buf = kmalloc(size, GFP_KERNEL);
|
buf = kmemdup(data, size, GFP_KERNEL);
|
||||||
if (buf == NULL)
|
if (buf == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
memcpy(buf, data, size);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* note: if successful returns number of bytes transfered */
|
/* note: if successful returns number of bytes transfered */
|
||||||
|
Loading…
Reference in New Issue
Block a user