Patchwork [3/5] net/hyperv: Remove the unnecessary memset in rndis_filter_send()

login
register
mail settings
Submitter Haiyang Zhang
Date Jan. 30, 2012, 4:33 p.m.
Message ID <1327941218-12547-3-git-send-email-haiyangz@microsoft.com>
Download mbox | patch
Permalink /patch/138607/
State Changes Requested
Delegated to: David Miller
Headers show

Comments

Haiyang Zhang - Jan. 30, 2012, 4:33 p.m.
The memory has been allocated by kzalloc, so it's unnecessary to memset
again.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>

---
 drivers/net/hyperv/rndis_filter.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

Patch

diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c
index 129e696..c0aa8b0 100644
--- a/drivers/net/hyperv/rndis_filter.c
+++ b/drivers/net/hyperv/rndis_filter.c
@@ -759,8 +759,6 @@  int rndis_filter_send(struct hv_device *dev,
 	/* Add the rndis header */
 	filter_pkt = (struct rndis_filter_packet *)pkt->extension;
 
-	memset(filter_pkt, 0, sizeof(struct rndis_filter_packet));
-
 	rndis_msg = &filter_pkt->msg;
 	rndis_msg_size = RNDIS_MESSAGE_SIZE(struct rndis_packet);