aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/hv/connection.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c
index ec3b8cdf1e0..8f4743ab5fb 100644
--- a/drivers/hv/connection.c
+++ b/drivers/hv/connection.c
@@ -195,7 +195,10 @@ int vmbus_connect(void)
do {
ret = vmbus_negotiate_version(msginfo, version);
- if (ret == 0)
+ if (ret)
+ goto cleanup;
+
+ if (vmbus_connection.conn_state == CONNECTED)
break;
version = vmbus_get_next_version(version);