aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hv
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2014-08-27 19:25:35 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-24 02:30:38 -0400
commit45d727cee9e200f5b351528b9fb063b69cf702c8 (patch)
tree047fd0a4d876c0a92dec51d3bca34c66ad06b460 /drivers/hv
parent72c6b71c245dac8f371167d97ef471b367d0b66b (diff)
Drivers: hv: vmbus: Fix a bug in vmbus_open()
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> Cc: <stable@vger.kernel.org> Tested-by: Sitsofe Wheeler <sitsofe@yahoo.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv')
-rw-r--r--drivers/hv/channel.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index 3788a181f176..b4eebe34ca91 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,
165 ret = vmbus_post_msg(open_msg, 165 ret = vmbus_post_msg(open_msg,
166 sizeof(struct vmbus_channel_open_channel)); 166 sizeof(struct vmbus_channel_open_channel));
167 167
168 if (ret != 0) 168 if (ret != 0) {
169 err = ret;
169 goto error1; 170 goto error1;
171 }
170 172
171 t = wait_for_completion_timeout(&open_info->waitevent, 5*HZ); 173 t = wait_for_completion_timeout(&open_info->waitevent, 5*HZ);
172 if (t == 0) { 174 if (t == 0) {