summaryrefslogtreecommitdiffstats
path: root/drivers/hv
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2015-02-28 20:18:20 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-02 04:31:02 +0100
commit5380b383ba10915e61e3db09341cf8193f0601ad (patch)
tree46553ab8ebd2dabedc09008de506bd9bc04fa021 /drivers/hv
parentDrivers: hv: vmbus: Remove the channel from the channel list(s) on failure (diff)
downloadlinux-5380b383ba10915e61e3db09341cf8193f0601ad.tar.xz
linux-5380b383ba10915e61e3db09341cf8193f0601ad.zip
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')
-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;