Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3007766pxj; Sun, 6 Jun 2021 22:58:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPCVRTNvXJR/LWdKA7PClVw4N1w3pi7oBX0T9DjI/GIyAX/obQHnj8PZUQomqCHQOrvBjg X-Received: by 2002:a05:6402:348f:: with SMTP id v15mr6450398edc.135.1623045511450; Sun, 06 Jun 2021 22:58:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623045511; cv=none; d=google.com; s=arc-20160816; b=zl3unX6zBkZh9208Z2ytdmQ22iV3hBmFoFrGxlZRRTw6vKirtAk5+xgsFwtw2cvzVO vYmc7WvpC9Ffd+OOTENjxRmsz7a0IIQET3G8+KU8BdS2Lqw6289Xzgb3/PCdr9IFvQm3 2psVC42oOAGs0YSrhoPckqrGHHpZgBr2YKijk3cMynUSlN3fnZRpoYTNoQQivDsWO+ue syou0NqnxgffPQtMzgTA0UOw0vPkiAbC5ZLaAzEcNCLfsFcGMx6O/zY7VC21256EwYa9 RFctHJiLaiVu5VhakoY07Atal83vz4LvBeclTYEpn5O4tTtAs7GqUtWXQHww9xA2Ria/ WXFw== 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=QNfhWd67xpyJE96EX743bIXbMs6iqwMef4q643lOIdU=; b=pwF7kiZyXwTjF7zsz1ZROITkwfelN0ILzmEWfggmPFyEyg5oS2+xV9FBiG9AL5yG06 bgwy9G6bQbe9/kMw3+lu4Cbb/SXPxyoM+GHTpKwv8Do/IcEVMWVG05144XY3qiPzyIRP woQydvpjns1AYXfWo6CpLAXiHELaACKPhDtI6Q8PFSuyBtacjfB9ux7v9rU9uLlGbusI viIiE4FzcmKdQGNf9kp5J30wnWjt+E7iLNAzkMCeVzttqP81cW6JVAvJNZH6MAK6r2UW yVr4ei9Pm9IXfSmyLdVa+QnwmMCe4LZO28zkc0wquSJ4u2TxjrhwqzmUCpZrXb2l03YG RAtg== 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 k6si13021191edq.273.2021.06.06.22.58.09; Sun, 06 Jun 2021 22:58:31 -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 S230127AbhFGF6W (ORCPT + 99 others); Mon, 7 Jun 2021 01:58:22 -0400 Received: from out30-56.freemail.mail.aliyun.com ([115.124.30.56]:39452 "EHLO out30-56.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229578AbhFGF6V (ORCPT ); Mon, 7 Jun 2021 01:58:21 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R981e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0UbWDIvI_1623045387; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UbWDIvI_1623045387) by smtp.aliyun-inc.com(127.0.0.1); Mon, 07 Jun 2021 13:56:29 +0800 From: Yang Li To: jdmason@kudzu.us Cc: dave.jiang@intel.com, allenbh@gmail.com, logang@deltatee.com, linux-ntb@googlegroups.com, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH v2] NTB: Fix an error code in ntb_msit_probe() Date: Mon, 7 Jun 2021 13:56:20 +0800 Message-Id: <1623045380-125394-1-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When the value of nm->isr_ctx is false, the value of ret is 0. So, we set ret to -ENOMEM to indicate this error. Clean up smatch warning: drivers/ntb/test/ntb_msi_test.c:373 ntb_msit_probe() warn: missing error code 'ret'. Reported-by: Abaci Robot Signed-off-by: Yang Li --- Change in v2: --revise typo drivers/ntb/test/ntb_msi_test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/ntb/test/ntb_msi_test.c b/drivers/ntb/test/ntb_msi_test.c index 7095ecd..4e18e08 100644 --- a/drivers/ntb/test/ntb_msi_test.c +++ b/drivers/ntb/test/ntb_msi_test.c @@ -369,8 +369,10 @@ static int ntb_msit_probe(struct ntb_client *client, struct ntb_dev *ntb) if (ret) goto remove_dbgfs; - if (!nm->isr_ctx) + if (!nm->isr_ctx) { + ret = -ENOMEM; goto remove_dbgfs; + } ntb_link_enable(ntb, NTB_SPEED_AUTO, NTB_WIDTH_AUTO); -- 1.8.3.1