From: Larry Finger <Larry.Finger@lwfinger.net>
To: Andrei Epure <epure.andrei@gmail.com>
Cc: chaoming_li@realsil.com.cn, linville@tuxdriver.com,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] wireless:rtlwifi: replaced kmalloc+memcpy with kmemdup
Date: Mon, 11 Mar 2013 15:46:41 -0500 [thread overview]
Message-ID: <513E42B1.3030108@lwfinger.net> (raw)
In-Reply-To: <1362920987-6679-1-git-send-email-epure.andrei@gmail.com>
On 03/10/2013 08:09 AM, Andrei Epure wrote:
> Signed-off-by: Andrei Epure <epure.andrei@gmail.com>
> ---
> drivers/net/wireless/rtlwifi/usb.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
> index 156b527..b5c80b5 100644
> --- a/drivers/net/wireless/rtlwifi/usb.c
> +++ b/drivers/net/wireless/rtlwifi/usb.c
> @@ -224,10 +224,9 @@ static void _usb_writeN_sync(struct rtl_priv *rtlpriv, u32 addr, void *data,
> u8 *buffer;
>
> wvalue = (u16)(addr & 0x0000ffff);
> - buffer = kmalloc(len, GFP_ATOMIC);
> + buffer = kmemdup(data, len, GFP_ATOMIC);
> if (!buffer)
> return;
> - memcpy(buffer, data, len);
> usb_control_msg(udev, pipe, request, reqtype, wvalue,
> index, buffer, len, 50);
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Thanks,
Larry
prev parent reply other threads:[~2013-03-11 20:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-10 13:09 Andrei Epure
2013-03-11 20:46 ` Larry Finger [this message]
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=513E42B1.3030108@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=chaoming_li@realsil.com.cn \
--cc=epure.andrei@gmail.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
all inboxes | Powered by JetHome®