diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index ec3b8cdf1e043fe6a987929c24739fa8df282ba7..8f4743ab5fb279ae416fbce5ff4e16e58db45eaf 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);