Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2351135pxb; Mon, 20 Sep 2021 19:46:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyq/HYnLqI5m+sgSCFVe0DLw2UwkcOtyklOJGSve2eIZOF8L/609OBUurtpW7XIoxidge+s X-Received: by 2002:a50:bf49:: with SMTP id g9mr9389464edk.262.1632192407307; Mon, 20 Sep 2021 19:46:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192407; cv=none; d=google.com; s=arc-20160816; b=KQyGECuzpQfl1F/HxYlEzwadeoZDoIClpFBvQlESnLZ5n+qZ8H50YzL8w8cX4gHzcp JuRqbOsEBnvVVZPDbjX78fFf2o1E6TNWD+mtRqEmaBZqhd/L50/TWQyVNHR2N+i1gTWn Z7VvCxy7hmFOi6YzdyU2EvdQPVAek9J6MU2mrkW21/Zj1vmpn29kkF2nOYOSyUH6RgQH bsSlZ48cFa/vHVImoc1WqnQKUb8Th9CUA/kk68kpyvBpQAyyn//lDSPytU93FCpYd8sD BP9lR4U2AFyFVzFMFmSTjSFThFG4/QCLxeb7UbrOrgPjho44hP9y1WfKgumhMFfJ1gOV 8ZKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=9/R/TcPPlDoUjGXbFAnbCMCxLS8xB6PjWQ03hQkPibw=; b=dZ1nRxJTbwsrNV7iDKDQ+t0PKIY2qO2CYSJMvsE2pf7Cn/ZJDb8iTY9LGzSzuOe8FC k8lKxyUTX7MKsEj6K30do4lr93Fq4InNva1Hfb3SLTlGPtZZ7zeMLWdZPFbVDBsLgo3s lcO7bveai+3SbQ4p10JZifywW4XznR707xkX5DaqD9YwNyc2RdQXiLWBkNMBsnisO+9T NicDSnKRGEOvH1viDaHPDNEwfEql1j3NV/g2w2bkC9ycow4sC17sheso+tnreEw/kJjV 4XrcXgWATo72DbEuHCTxgzepfI2aElEUC6vBNnXSGm3fS95KqG5Dtz6nx3Vz5dCltxPu 51+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BhT5WNJY; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id os28si12793983ejb.559.2021.09.20.19.46.23; Mon, 20 Sep 2021 19:46:47 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BhT5WNJY; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348207AbhITS1x (ORCPT + 99 others); Mon, 20 Sep 2021 14:27:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:40992 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348020AbhITSU6 (ORCPT ); Mon, 20 Sep 2021 14:20:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1F8C9613A9; Mon, 20 Sep 2021 17:23:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632158632; bh=U67OreaikvH+lcv14uvfEz8Sjs68iNs55ntpwLtf2aA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BhT5WNJY7Bh0t+9QkKomZgoILE8k+3QeTsY0UpuV2kdjzucer2HChOiSac5LaRCsv 7CFc/9OqcKSAZ1gxqVeaibTL8sMct14dEVbCSnSPxzChxbLHrro2bZCqR67eBDMdal RDX3KZRDUABBpKsiMeUv8vqzhx8ZVrJ3K7Mf3anY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Abaci Robot , Yang Li , Logan Gunthorpe , Jon Mason , Sasha Levin Subject: [PATCH 5.4 245/260] NTB: Fix an error code in ntb_msit_probe() Date: Mon, 20 Sep 2021 18:44:23 +0200 Message-Id: <20210920163939.446071535@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163931.123590023@linuxfoundation.org> References: <20210920163931.123590023@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yang Li [ Upstream commit 319f83ac98d7afaabab84ce5281a819a358b9895 ] 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 Reviewed-by: Logan Gunthorpe Signed-off-by: Jon Mason Signed-off-by: Sasha Levin --- 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 99d826ed9c34..662067dc9ce2 100644 --- a/drivers/ntb/test/ntb_msi_test.c +++ b/drivers/ntb/test/ntb_msi_test.c @@ -372,8 +372,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); -- 2.30.2