mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 02:50:43 +00:00
netvsc: mark error cases as unlikely
Mark if() statements used for error handling only as unlikely() Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
2d05b56097
commit
2d694d2abe
1 changed files with 2 additions and 2 deletions
|
@ -855,14 +855,14 @@ int netvsc_send(struct hv_device *device,
|
|||
bool xmit_more = (skb != NULL) ? skb->xmit_more : false;
|
||||
|
||||
net_device = get_outbound_net_device(device);
|
||||
if (!net_device)
|
||||
if (unlikely(!net_device))
|
||||
return -ENODEV;
|
||||
|
||||
/* We may race with netvsc_connect_vsp()/netvsc_init_buf() and get
|
||||
* here before the negotiation with the host is finished and
|
||||
* send_section_map may not be allocated yet.
|
||||
*/
|
||||
if (!net_device->send_section_map)
|
||||
if (unlikely(!net_device->send_section_map))
|
||||
return -EAGAIN;
|
||||
|
||||
nvchan = &net_device->chan_table[packet->q_idx];
|
||||
|
|
Loading…
Reference in a new issue