Skip to content

Commit

Permalink
staging: csr: remove unneeded call to memset().
Browse files Browse the repository at this point in the history
In uf_send_pkt_to_encrypt(), the memory area zeroed by this call to memset() is
overwritten by a call to memcpy() a few instructions later, so it is not needed.

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Cyril Roelandt authored and Greg Kroah-Hartman committed Jan 7, 2013
1 parent c020a7a commit 78855c7
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/staging/csr/unifi_sme.c
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,6 @@ void uf_send_pkt_to_encrypt(struct work_struct *work)

if (pktBulkDataLength > 0) {
pktBulkData = kmalloc(pktBulkDataLength, GFP_KERNEL);
memset(pktBulkData, 0, pktBulkDataLength);
} else {
unifi_error(priv, "uf_send_pkt_to_encrypt() : invalid buffer\n");
return;
Expand Down

0 comments on commit 78855c7

Please sign in to comment.