Drivers: hv: vmbus: Fix a bug in vmbus_open()
authorK. Y. Srinivasan <kys@microsoft.com>
Wed, 27 Aug 2014 23:25:35 +0000 (16:25 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Oct 2014 16:35:11 +0000 (09:35 -0700)
commit 45d727cee9e200f5b351528b9fb063b69cf702c8 upstream.

Fix a bug in vmbus_open() and properly propagate the error. I would
like to thank Dexuan Cui <decui@microsoft.com> for identifying the
issue.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Tested-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/channel.c

index d34db9fdc518934a7dd0b6dda5202404807ac565..92f34de7aee93f78ec582996dd281533059b82f8 100644 (file)
@@ -199,8 +199,10 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
        ret = vmbus_post_msg(open_msg,
                               sizeof(struct vmbus_channel_open_channel));
 
-       if (ret != 0)
+       if (ret != 0) {
+               err = ret;
                goto error1;
+       }
 
        t = wait_for_completion_timeout(&open_info->waitevent, 5*HZ);
        if (t == 0) {