diff mbox

[azure,01/14] UBUNTU: SAUCE: vmbus: vmbus_open(): reset onchannel_callback on error

Message ID 1497979654-27251-2-git-send-email-marcelo.cerri@canonical.com
State New
Headers show

Commit Message

Marcelo Henrique Cerri June 20, 2017, 5:27 p.m. UTC
From: Dexuan Cui <decui@microsoft.com>

BugLink: http://bugs.launchpad.net/bugs/1698425

No real issue is observed without the patch, but let's add this
just in case.

Signed-off-by: Dexuan Cui <decui@microsoft.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
---
 drivers/hv/channel.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index 736ac76d2a6a..5f91e6b8eb01 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -220,6 +220,8 @@  int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
 		     get_order(send_ringbuffer_size + recv_ringbuffer_size));
 error_set_chnstate:
 	newchannel->state = CHANNEL_OPEN_STATE;
+	newchannel->onchannel_callback = NULL;
+	newchannel->channel_callback_context = NULL;
 	return err;
 }
 EXPORT_SYMBOL_GPL(vmbus_open);