hyperv/vmbus: Always try disconnect/free bufring memory upon channel close

While I'm here, minor wording and style changes.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8598
This commit is contained in:
Sepherosa Ziehau 2016-11-25 08:31:13 +00:00
parent f2aeeaff6f
commit 0743140a63
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=309138

View File

@ -792,7 +792,7 @@ vmbus_chan_close_internal(struct vmbus_channel *chan)
vmbus_chan_printf(chan,
"can not get msg hypercall for chclose(chan%u)\n",
chan->ch_id);
return;
goto disconnect;
}
req = vmbus_msghc_dataptr(mh);
@ -806,11 +806,13 @@ vmbus_chan_close_internal(struct vmbus_channel *chan)
vmbus_chan_printf(chan,
"chclose(chan%u) msg hypercall exec failed: %d\n",
chan->ch_id, error);
return;
} else if (bootverbose) {
vmbus_chan_printf(chan, "close chan%u\n", chan->ch_id);
goto disconnect;
}
if (bootverbose)
vmbus_chan_printf(chan, "chan%u closed\n", chan->ch_id);
disconnect:
/*
* Disconnect the TX+RX bufrings from this channel.
*/