Commit 7aab5159 authored by Jerry Snitselaar's avatar Jerry Snitselaar Committed by David S. Miller

hv_netvsc: remove unused variable in netvsc_send()

With commit b56fc3c5 ("hv_netvsc: Fix a bug in netvsc_start_xmit()"),
skb variable is no longer used in netvsc_send. Remove variable and dead
code that depended on it.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarJerry Snitselaar <jsnitsel@redhat.com>
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b7ba7b46
...@@ -826,7 +826,6 @@ int netvsc_send(struct hv_device *device, ...@@ -826,7 +826,6 @@ int netvsc_send(struct hv_device *device,
u16 q_idx = packet->q_idx; u16 q_idx = packet->q_idx;
u32 pktlen = packet->total_data_buflen, msd_len = 0; u32 pktlen = packet->total_data_buflen, msd_len = 0;
unsigned int section_index = NETVSC_INVALID_INDEX; unsigned int section_index = NETVSC_INVALID_INDEX;
struct sk_buff *skb = NULL;
unsigned long flag; unsigned long flag;
struct multi_send_data *msdp; struct multi_send_data *msdp;
struct hv_netvsc_packet *msd_send = NULL, *cur_send = NULL; struct hv_netvsc_packet *msd_send = NULL, *cur_send = NULL;
...@@ -924,12 +923,8 @@ int netvsc_send(struct hv_device *device, ...@@ -924,12 +923,8 @@ int netvsc_send(struct hv_device *device,
if (cur_send) if (cur_send)
ret = netvsc_send_pkt(cur_send, net_device); ret = netvsc_send_pkt(cur_send, net_device);
if (ret != 0) { if (ret != 0 && section_index != NETVSC_INVALID_INDEX)
if (section_index != NETVSC_INVALID_INDEX) netvsc_free_send_slot(net_device, section_index);
netvsc_free_send_slot(net_device, section_index);
} else if (skb) {
dev_kfree_skb_any(skb);
}
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment