Browse Source

ath: changed kmalloc to kmemdup

Signed-off-by: Andrei Epure <epure.andrei@gmail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Andrei Epure 12 years ago
parent
commit
a41d9a91e3
1 changed files with 1 additions and 3 deletions
  1. 1 3
      drivers/net/wireless/ath/ath6kl/usb.c

+ 1 - 3
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 */