summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorstephen hemminger <stephen@networkplumber.org>2017-07-28 08:59:41 -0700
committerDavid S. Miller <davem@davemloft.net>2017-07-29 15:25:43 -0700
commitd6aac1f218873f2266de23280bffb909b4a98fbf (patch)
treec527aef2275ede63c3298564eab8abc82241cfbb /drivers
parenta847135a56ff5d5994fcaabd36b2a8b581913433 (diff)
netvsc: fix return value for set_channels
The error and normal case got swapped. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/hyperv/netvsc_drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 262486ce8e2a..f1eaf675d2e9 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -758,8 +758,8 @@ static int netvsc_set_channels(struct net_device *net,
if (!IS_ERR(nvdev)) {
netif_set_real_num_tx_queues(net, nvdev->num_chn);
netif_set_real_num_rx_queues(net, nvdev->num_chn);
- ret = PTR_ERR(nvdev);
} else {
+ ret = PTR_ERR(nvdev);
device_info.num_chn = orig;
rndis_filter_device_add(dev, &device_info);
}