hv: vmbus_open(): reset the channel state on ENOMEM
authorDexuan Cui <decui@microsoft.com>
Fri, 27 Feb 2015 19:26:00 +0000 (11:26 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Mar 2015 03:30:07 +0000 (19:30 -0800)
commitac0d12b7cee73b4b4b769ea58c62ec7042c6be13
tree54438c288b9ddf6babf182d27b435222f7660db0
parent89f9f6796d41e10e224b0cb0027ddd78cb881f65
hv: vmbus_open(): reset the channel state on ENOMEM

Without this patch, the state is put to CHANNEL_OPENING_STATE, and when
the driver is loaded next time, vmbus_open() will fail immediately due to
newchannel->state != CHANNEL_OPEN_STATE.

CC: "K. Y. Srinivasan" <kys@microsoft.com>
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Reviewed-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/channel.c