From 9403cd7cbb08aa3709c632decafa2014c8ed96e6 Mon Sep 17 00:00:00 2001 From: Jarno Rajahalme Date: Fri, 18 Nov 2016 15:40:40 -0800 Subject: virtio_net: Do not clear memory for struct virtio_net_hdr twice. virtio_net_hdr_from_skb() clears the memory for the header, so there is no point for the callers to do the same. Signed-off-by: Jarno Rajahalme Signed-off-by: David S. Miller --- net/packet/af_packet.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'net/packet') diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index d2238b204691..abe6c0b6683c 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -1970,8 +1970,6 @@ static unsigned int run_filter(struct sk_buff *skb, static int __packet_rcv_vnet(const struct sk_buff *skb, struct virtio_net_hdr *vnet_hdr) { - *vnet_hdr = (const struct virtio_net_hdr) { 0 }; - if (virtio_net_hdr_from_skb(skb, vnet_hdr, vio_le())) BUG(); -- cgit