Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <tipecaml@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Cyril Roelandt and committed by
Greg Kroah-Hartman
78855c7a c020a7a4

-1
-1
drivers/staging/csr/unifi_sme.c
··· 1196 1196 1197 1197 if (pktBulkDataLength > 0) { 1198 1198 pktBulkData = kmalloc(pktBulkDataLength, GFP_KERNEL); 1199 - memset(pktBulkData, 0, pktBulkDataLength); 1200 1199 } else { 1201 1200 unifi_error(priv, "uf_send_pkt_to_encrypt() : invalid buffer\n"); 1202 1201 return;