* [PATCH] ath: changed kmalloc to kmemdup
@ 2013-03-10 12:39 Andrei Epure
2013-03-10 13:27 ` Kalle Valo
2013-03-18 12:09 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Andrei Epure @ 2013-03-10 12:39 UTC (permalink / raw)
To: linville; +Cc: kvalo, linux-wireless, netdev, linux-kernel, Andrei Epure
Signed-off-by: Andrei Epure <epure.andrei@gmail.com>
---
drivers/net/wireless/ath/ath6kl/usb.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/usb.c b/drivers/net/wireless/ath/ath6kl/usb.c
index 5fcd342..ffa1daa 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 */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ath: changed kmalloc to kmemdup
2013-03-10 12:39 [PATCH] ath: changed kmalloc to kmemdup Andrei Epure
@ 2013-03-10 13:27 ` Kalle Valo
2013-03-18 12:09 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2013-03-10 13:27 UTC (permalink / raw)
To: Andrei Epure; +Cc: linville, linux-wireless, netdev, linux-kernel, ath6kl-devel
Andrei Epure <epure.andrei@gmail.com> writes:
> Signed-off-by: Andrei Epure <epure.andrei@gmail.com>
Thanks, I'll take this. But please prefix ath6kl patches with "ath6kl:"
in the future.
--
Kalle Valo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ath: changed kmalloc to kmemdup
2013-03-10 12:39 [PATCH] ath: changed kmalloc to kmemdup Andrei Epure
2013-03-10 13:27 ` Kalle Valo
@ 2013-03-18 12:09 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2013-03-18 12:09 UTC (permalink / raw)
To: Andrei Epure; +Cc: linville, linux-wireless, netdev, linux-kernel
Andrei Epure <epure.andrei@gmail.com> writes:
> Signed-off-by: Andrei Epure <epure.andrei@gmail.com>
> ---
> drivers/net/wireless/ath/ath6kl/usb.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath6kl/usb.c b/drivers/net/wireless/ath/ath6kl/usb.c
> index 5fcd342..ffa1daa 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);
> }
Thanks, applied to ath6kl.git.
--
Kalle Valo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-18 12:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-10 12:39 [PATCH] ath: changed kmalloc to kmemdup Andrei Epure
2013-03-10 13:27 ` Kalle Valo
2013-03-18 12:09 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).