summaryrefslogtreecommitdiffstats
path: root/drivers/hv/hv_util.c
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2015-02-28 11:18:20 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-01 19:31:02 -0800
commit5380b383ba10915e61e3db09341cf8193f0601ad (patch)
tree46553ab8ebd2dabedc09008de506bd9bc04fa021 /drivers/hv/hv_util.c
parent5b1e5b530753e660080d402b81b88684893157d5 (diff)
downloadlinux-5380b383ba10915e61e3db09341cf8193f0601ad.tar.bz2
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>
Diffstat (limited to 'drivers/hv/hv_util.c')
-rw-r--r--drivers/hv/hv_util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hv/hv_util.c b/drivers/hv/hv_util.c
index c5be7737559f..7994ec2e4151 100644
--- a/drivers/hv/hv_util.c
+++ b/drivers/hv/hv_util.c
@@ -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;