From: stephen hemminger Date: Fri, 28 Jul 2017 15:59:41 +0000 (-0700) Subject: netvsc: fix return value for set_channels X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d6aac1f218873f2266de23280bffb909b4a98fbf;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git netvsc: fix return value for set_channels The error and normal case got swapped. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller --- 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); }