diff options
author | Jiapeng Chong <jiapeng.chong@linux.alibaba.com> | 2021-05-25 18:58:41 +0800 |
---|---|---|
committer | Wei Liu <wei.liu@kernel.org> | 2021-06-02 15:16:36 +0000 |
commit | 9de6655cc5a6a1febc514465c87c24a0e96d8dba (patch) | |
tree | a18916cdc76a68d1b2ea8613012b17e063cf77ae /drivers/hv | |
parent | 450605c28d571eddca39a65fdbc1338add44c6d9 (diff) | |
download | linux-stable-9de6655cc5a6a1febc514465c87c24a0e96d8dba.tar.gz linux-stable-9de6655cc5a6a1febc514465c87c24a0e96d8dba.tar.bz2 linux-stable-9de6655cc5a6a1febc514465c87c24a0e96d8dba.zip |
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 <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/1621940321-72353-1-git-send-email-jiapeng.chong@linux.alibaba.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'drivers/hv')
-rw-r--r-- | drivers/hv/connection.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index 311cd005b3be..5e479d54918c 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) |