mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-15 09:55:36 +00:00
Drivers: hv: util: On device remove, close the channel after de-initializing the service
When the offer is rescinded, vmbus_close() can free up the channel; deinitialize the service before closing the channel. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5b1e5b5307
commit
5380b383ba
@ -380,9 +380,9 @@ static int util_remove(struct hv_device *dev)
|
||||
{
|
||||
struct hv_util_service *srv = hv_get_drvdata(dev);
|
||||
|
||||
vmbus_close(dev->channel);
|
||||
if (srv->util_deinit)
|
||||
srv->util_deinit();
|
||||
vmbus_close(dev->channel);
|
||||
kfree(srv->recv_buffer);
|
||||
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user