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

Signed-off-by: K. Y. Srinivasan <k...@microsoft.com>
Cc: <sta...@vger.kernel.org>
---
 drivers/hv/channel.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index 9a6a2c3..19bad59 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -165,8 +165,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) {
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to