mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 23:47:39 +07:00
Merge branch 'hv_netvsc-fix-error-handling-in-netvsc_attach-set_features'
Haiyang Zhang says: ==================== hv_netvsc: fix error handling in netvsc_attach/set_features The error handling code path in these functions are not correct. This patch set fixes them. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
3da0966320
@ -982,7 +982,7 @@ static int netvsc_attach(struct net_device *ndev,
|
||||
if (netif_running(ndev)) {
|
||||
ret = rndis_filter_open(nvdev);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto err;
|
||||
|
||||
rdev = nvdev->extension;
|
||||
if (!rdev->link_state)
|
||||
@ -990,6 +990,13 @@ static int netvsc_attach(struct net_device *ndev,
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err:
|
||||
netif_device_detach(ndev);
|
||||
|
||||
rndis_filter_device_remove(hdev, nvdev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int netvsc_set_channels(struct net_device *net,
|
||||
@ -1807,8 +1814,10 @@ static int netvsc_set_features(struct net_device *ndev,
|
||||
|
||||
ret = rndis_filter_set_offload_params(ndev, nvdev, &offloads);
|
||||
|
||||
if (ret)
|
||||
if (ret) {
|
||||
features ^= NETIF_F_LRO;
|
||||
ndev->features = features;
|
||||
}
|
||||
|
||||
syncvf:
|
||||
if (!vf_netdev)
|
||||
|
Loading…
Reference in New Issue
Block a user