netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrei Epure <epure.andrei@gmail.com>
To: linville@tuxdriver.com
Cc: kvalo@qca.qualcomm.com, linux-wireless@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andrei Epure <epure.andrei@gmail.com>
Subject: [PATCH] ath: changed kmalloc to kmemdup
Date: Sun, 10 Mar 2013 14:39:58 +0200	[thread overview]
Message-ID: <1362919199-16292-1-git-send-email-epure.andrei@gmail.com> (raw)

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

             reply	other threads:[~2013-03-10 12:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-10 12:39 Andrei Epure [this message]
     [not found] ` <1362919199-16292-1-git-send-email-epure.andrei-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-03-10 13:27   ` [PATCH] ath: changed kmalloc to kmemdup Kalle Valo
2013-03-18 12:09 ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1362919199-16292-1-git-send-email-epure.andrei@gmail.com \
    --to=epure.andrei@gmail.com \
    --cc=kvalo@qca.qualcomm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).