Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5380b383 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman
Browse files

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: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5b1e5b53
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -380,9 +380,9 @@ static int util_remove(struct hv_device *dev)
{
{
	struct hv_util_service *srv = hv_get_drvdata(dev);
	struct hv_util_service *srv = hv_get_drvdata(dev);


	vmbus_close(dev->channel);
	if (srv->util_deinit)
	if (srv->util_deinit)
		srv->util_deinit();
		srv->util_deinit();
	vmbus_close(dev->channel);
	kfree(srv->recv_buffer);
	kfree(srv->recv_buffer);


	return 0;
	return 0;