Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4450994pxj; Tue, 25 May 2021 08:17:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNy2YQtauRvu3NMS7UTBr27zdWyKRtB+2fpzL5URm4L0Bkc34LgchtHST5upElLzL1Nnse X-Received: by 2002:a17:907:c19:: with SMTP id ga25mr29092509ejc.33.1621955836095; Tue, 25 May 2021 08:17:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621955836; cv=none; d=google.com; s=arc-20160816; b=ah+YpkSz3Z0XCNaaxfr8OvZVpUkgXCdP6wiAHreMFJd3T6GQncW8VqtFFNBXi+Xo1d /L4Stk3TBPcTabPRxR2hG2/Wq2fzZPub0o4t5ODv4iLReKOe2QkJbVOpeKVdSMmMQfE8 VwWUBnCr3H6my2vjXo3q6QYHnThbFHjnymlHJkyJf9FhhFeTGEbcQkbakm9OEx8d5Sr3 XdHW9QWfbu521fQWtEhna2TF0iz9V+SPGU35HIKBXPQE/mnNn9xp8yxUoZrcSHmmwmiS IlH8EkUH+7e2CBfecZ1Ynu+rgdN5IxurbZzDcAYyrDccizvyWeGHn38TksyL7dMZzKZq +PCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=9fwBNWEdTOYR+vXORCKTkUS0xVxtg7PIAXlQSmJAT/U=; b=VMx9xYdc4ww5gFJqpUYtQPNOHGGLL0/U797suYzbfH39A2oMjZZwHHNNkNvRkDM/hB 1yvpu16d7FQQKiEl2gkaAPcX9F1ph1nPQKuRVEJ+mbs27fi36dSa03TRNicvS2psEaMj PqavuX+wz5bReuY+ucB1HH0KvE/YKmY0Yv0U3MRIVlT1638MgRStp1XNk6V8OupOQXZH 3GMNg8ZkvD/904+GpoBOOwtI0+67juv47E7zYQeW8fe5Nf/zsDgtRS11Pdk4updkIXnh 1AYYCcIvI88RUvJBe94MFf0zfWfUX8Zp0i0otM1nED4lmhJCxDmEm4l4g8Qs1d2eCS57 gQmw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id by20si15999121ejb.660.2021.05.25.08.16.53; Tue, 25 May 2021 08:17:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230207AbhEYLAS (ORCPT + 99 others); Tue, 25 May 2021 07:00:18 -0400 Received: from out30-131.freemail.mail.aliyun.com ([115.124.30.131]:33171 "EHLO out30-131.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229581AbhEYLAR (ORCPT ); Tue, 25 May 2021 07:00:17 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R901e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=alimailimapcm10staff010182156082;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0Ua4Ghke_1621940322; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0Ua4Ghke_1621940322) by smtp.aliyun-inc.com(127.0.0.1); Tue, 25 May 2021 18:58:46 +0800 From: Jiapeng Chong To: kys@microsoft.com Cc: haiyangz@microsoft.com, sthemmin@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] drivers: hv: Fix missing error code in vmbus_connect() Date: Tue, 25 May 2021 18:58:41 +0800 Message-Id: <1621940321-72353-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Eliminate the follow smatch warning: drivers/hv/connection.c:236 vmbus_connect() warn: missing error code 'ret'. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- 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