Skip to content

Commit 9de6655

Browse files
Jiapeng Chongliuw
authored andcommitted
drivers: hv: Fix missing error code in vmbus_connect()
Eliminate the follow smatch warning: drivers/hv/connection.c:236 vmbus_connect() warn: missing error code 'ret'. Reported-by: Abaci Robot <[email protected]> Signed-off-by: Jiapeng Chong <[email protected]> Reviewed-by: Michael Kelley <[email protected]> Link: https://lore.kernel.org/r/1621940321-72353-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Wei Liu <[email protected]>
1 parent 450605c commit 9de6655

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/hv/connection.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,10 @@ int vmbus_connect(void)
232232
*/
233233

234234
for (i = 0; ; i++) {
235-
if (i == ARRAY_SIZE(vmbus_versions))
235+
if (i == ARRAY_SIZE(vmbus_versions)) {
236+
ret = -EDOM;
236237
goto cleanup;
238+
}
237239

238240
version = vmbus_versions[i];
239241
if (version > max_version)

0 commit comments

Comments
 (0)