From 96ec2939620c48a503d9c89865c0c230d6f955e4 Mon Sep 17 00:00:00 2001 From: Dawei Li Date: Thu, 5 Jan 2023 22:51:23 +0800 Subject: 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 Link: https://lore.kernel.org/r/TYCP286MB2323A93C55526E4DF239D3ACCAFA9@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM Signed-off-by: Wei Liu --- drivers/hv/hv_balloon.c | 4 +--- drivers/hv/hv_util.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'drivers/hv') diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c index cbe43e2567a7..0d4b8fc47ac6 100644 --- a/drivers/hv/hv_balloon.c +++ b/drivers/hv/hv_balloon.c @@ -2042,7 +2042,7 @@ connect_error: return ret; } -static int balloon_remove(struct hv_device *dev) +static void balloon_remove(struct hv_device *dev) { struct hv_dynmem_device *dm = hv_get_drvdata(dev); struct hv_hotadd_state *has, *tmp; @@ -2083,8 +2083,6 @@ static int balloon_remove(struct hv_device *dev) kfree(has); } spin_unlock_irqrestore(&dm_device.ha_lock, flags); - - return 0; } static int balloon_suspend(struct hv_device *hv_dev) diff --git a/drivers/hv/hv_util.c b/drivers/hv/hv_util.c index d776074b49cb..42aec2c5606a 100644 --- a/drivers/hv/hv_util.c +++ b/drivers/hv/hv_util.c @@ -602,7 +602,7 @@ error1: return ret; } -static int util_remove(struct hv_device *dev) +static void util_remove(struct hv_device *dev) { struct hv_util_service *srv = hv_get_drvdata(dev); @@ -610,8 +610,6 @@ static int util_remove(struct hv_device *dev) srv->util_deinit(); vmbus_close(dev->channel); kfree(srv->recv_buffer); - - return 0; } /* -- cgit