All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers: hv: Fix missing error code in vmbus_connect()
@ 2021-05-25 10:58 Jiapeng Chong
  2021-05-25 15:30 ` Michael Kelley
  0 siblings, 1 reply; 3+ messages in thread
From: Jiapeng Chong @ 2021-05-25 10:58 UTC (permalink / raw)
  To: kys
  Cc: haiyangz, sthemmin, wei.liu, decui, linux-hyperv, linux-kernel,
	Jiapeng Chong

Eliminate the follow smatch warning:

drivers/hv/connection.c:236 vmbus_connect() warn: missing error code
'ret'.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 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 311cd00..5e479d5 100644
--- a/drivers/hv/connection.c
+++ b/drivers/hv/connection.c
@@ -232,8 +232,10 @@ int vmbus_connect(void)
 	 */
 
 	for (i = 0; ; i++) {
-		if (i == ARRAY_SIZE(vmbus_versions))
+		if (i == ARRAY_SIZE(vmbus_versions)) {
+			ret = -EDOM;
 			goto cleanup;
+		}
 
 		version = vmbus_versions[i];
 		if (version > max_version)
-- 
1.8.3.1


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

end of thread, other threads:[~2021-05-26 10:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-25 10:58 [PATCH] drivers: hv: Fix missing error code in vmbus_connect() Jiapeng Chong
2021-05-25 15:30 ` Michael Kelley
2021-05-26 10:07   ` Wei Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.