Skip to content

Commit

Permalink
Drivers: hv: util: On device remove, close the channel after de-initi…
Browse files Browse the repository at this point in the history
…alizing 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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
kattisrinivasan authored and gregkh committed Mar 2, 2015
1 parent 5b1e5b5 commit 5380b38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hv/hv_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5380b38

Please sign in to comment.