aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/hyperv
diff options
context:
space:
mode:
authorDawei Li <set_pte_at@outlook.com>2023-01-05 22:51:23 +0800
committerWei Liu <wei.liu@kernel.org>2023-01-17 13:41:27 +0000
commit96ec2939620c48a503d9c89865c0c230d6f955e4 (patch)
tree3106c661ed252f9a2ecd25d22b0e9fc50620b826 /drivers/net/hyperv
parentDrivers: hv: Enable vmbus driver for nested root partition (diff)
downloadwireguard-linux-96ec2939620c48a503d9c89865c0c230d6f955e4.tar.xz
wireguard-linux-96ec2939620c48a503d9c89865c0c230d6f955e4.zip
Drivers: hv: Make remove callback of hyperv driver void returned
Since commit fc7a6209d571 ("bus: Make remove callback return void") forces bus_type::remove be void-returned, it doesn't make much sense for any bus based driver implementing remove callbalk to return non-void to its caller. As such, change the remove function for Hyper-V VMBus based drivers to return void. Signed-off-by: Dawei Li <set_pte_at@outlook.com> Link: https://lore.kernel.org/r/TYCP286MB2323A93C55526E4DF239D3ACCAFA9@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'drivers/net/hyperv')
-rw-r--r--drivers/net/hyperv/netvsc_drv.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index f9b219e6cd58..42162167b5b4 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -2594,7 +2594,7 @@ no_net:
return ret;
}
-static int netvsc_remove(struct hv_device *dev)
+static void netvsc_remove(struct hv_device *dev)
{
struct net_device_context *ndev_ctx;
struct net_device *vf_netdev, *net;
@@ -2603,7 +2603,7 @@ static int netvsc_remove(struct hv_device *dev)
net = hv_get_drvdata(dev);
if (net == NULL) {
dev_err(&dev->device, "No net device to remove\n");
- return 0;
+ return;
}
ndev_ctx = netdev_priv(net);
@@ -2637,7 +2637,6 @@ static int netvsc_remove(struct hv_device *dev)
free_percpu(ndev_ctx->vf_stats);
free_netdev(net);
- return 0;
}
static int netvsc_suspend(struct hv_device *dev)