Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp988268pxj; Fri, 4 Jun 2021 03:23:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHOZ/tC1k5A/ayil+e8j1fbl0cT505CT20pi08tMwupSbfPVpXwEcCb7go4cljeZc4pilJ X-Received: by 2002:a17:906:1806:: with SMTP id v6mr3479368eje.454.1622802224975; Fri, 04 Jun 2021 03:23:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622802224; cv=none; d=google.com; s=arc-20160816; b=wMFd9bY0BewTUY2SocGco/+X1jK4EdzJOS94gjJZLx+T0pgbfuK+X6sUvKrpwEAV5W IZqe9w8A7IRQbQZMcX1W2rUyUSfjt76iY1nHlg9thFCMWWeM+MkULMoHs0LLveZadkDx /WRxGJxnW7esNmbrn7I+9fNWmoRM8PpJpviIBu/UpakqPu1oj9aghvvltzsRJ86LRrwx GWH078cj05CS62k8FIYoQMtDx71njau9myY0Veg2pmI2hDchS2CGwzahKKJg2MipMDms zatUdA28x06KW2We6LOWO+qSUeXsbAM0Czgo33umqo2U8ObBF7PCtlYaBEQxZ/tGjeAb Qj+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=hlvssWk7xaGTnp2BQmJFGxY4vrSgj6iuxVAfcM1hlPM=; b=iMa6o8dM0U1CEJYBWJoJrI7CFDkHOSAdhJEfZc/ygOfbHIdkBmnAQSi4OwIK+wt/3M qoiQIIcaZa2xFq2BjgsimkkgPRaBBkhiiG+MIRztY7J/jiBe50qR1xg83IZ/5bqq6InO dcO7i7EbfMAwgsKOPrs1W1J5UwEVw2lFCCObUJvTco2kXnGT7ChaUiVLTWcKxGaAV2r3 sPJqu8SYSnVe7/XwVkeopa5swC291FIDewHmGzsY/3xv4G07tnfEMknNM1gj+ttKd+wP sgAFpzsbd/ec+Gwqm311YMqNC+7Eyio/3DWlBWO2JwsRk5an5xxLZqyBAXm2mVIIlOhg qBJQ== 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 nb19si4942519ejc.713.2021.06.04.03.23.21; Fri, 04 Jun 2021 03:23:44 -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 S230030AbhFDKX0 (ORCPT + 99 others); Fri, 4 Jun 2021 06:23:26 -0400 Received: from out4436.biz.mail.alibaba.com ([47.88.44.36]:50796 "EHLO out4436.biz.mail.alibaba.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229625AbhFDKXZ (ORCPT ); Fri, 4 Jun 2021 06:23:25 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R661e4;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=6;SR=0;TI=SMTPD_---0UbFb0BY_1622802077; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UbFb0BY_1622802077) by smtp.aliyun-inc.com(127.0.0.1); Fri, 04 Jun 2021 18:21:23 +0800 From: Yang Li To: jdmason@kudzu.us Cc: dave.jiang@intel.com, allenbh@gmail.com, linux-ntb@googlegroups.com, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH 2/2] NTB: Fix an error code in ntb_msit_probe() Date: Fri, 4 Jun 2021 18:20:51 +0800 Message-Id: <1622802051-43464-2-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1622802051-43464-1-git-send-email-yang.lee@linux.alibaba.com> References: <1622802051-43464-1-git-send-email-yang.lee@linux.alibaba.com> 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 --- 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..5f9e0be 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) { + return -ENOMEM; goto remove_dbgfs; + } ntb_link_enable(ntb, NTB_SPEED_AUTO, NTB_WIDTH_AUTO); -- 1.8.3.1