From: Cyril Roelandt Date: Tue, 4 Dec 2012 20:41:07 +0000 (+0100) Subject: staging: csr: remove unneeded call to memset(). X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=78855c7a7c3db183ddb311cd832a137ef7a5e83a;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git staging: csr: remove unneeded call to memset(). 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/csr/unifi_sme.c b/drivers/staging/csr/unifi_sme.c index 7c6c4138fc76..76690374246c 100644 --- a/drivers/staging/csr/unifi_sme.c +++ b/drivers/staging/csr/unifi_sme.c @@ -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;