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>
This commit is contained in:
stephen hemminger 2017-07-28 08:59:41 -07:00 committed by David S. Miller
parent a847135a56
commit d6aac1f218

View file

@ -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);
}