public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Drivers: hv: vmbus: fix error return code in vmbus_connect()
@ 2013-09-11 11:19 Wei Yongjun
  2013-09-11 20:03 ` KY Srinivasan
  0 siblings, 1 reply; 5+ messages in thread
From: Wei Yongjun @ 2013-09-11 11:19 UTC (permalink / raw)
  To: kys, haiyangz; +Cc: yongjun_wei, devel, linux-kernel

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Fix to return -EINVAL in the version check error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/hv/connection.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c
index 8f4743a..b3eb50f 100644
--- a/drivers/hv/connection.c
+++ b/drivers/hv/connection.c
@@ -204,8 +204,10 @@ int vmbus_connect(void)
 		version = vmbus_get_next_version(version);
 	} while (version != VERSION_INVAL);
 
-	if (version == VERSION_INVAL)
+	if (version == VERSION_INVAL) {
+		ret = -EINVAL;
 		goto cleanup;
+	}
 
 	vmbus_proto_version = version;
 	pr_info("Hyper-V Host Build:%d-%d.%d-%d-%d.%d; Vmbus version:%d.%d\n",


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-09-12 11:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-11 11:19 [PATCH] Drivers: hv: vmbus: fix error return code in vmbus_connect() Wei Yongjun
2013-09-11 20:03 ` KY Srinivasan
2013-09-12  0:25   ` Wei Yongjun
2013-09-12  0:36     ` KY Srinivasan
2013-09-12 11:07       ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox