Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2351947pxb; Mon, 20 Sep 2021 19:48:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzF1y60o4HSlukmbi0H4Iqsb9ED7YS4Lue+Sx0ac2c+5fB7SCnw36QsrftcXR2kaejy+VM6 X-Received: by 2002:a05:6e02:1789:: with SMTP id y9mr3057557ilu.176.1632192512536; Mon, 20 Sep 2021 19:48:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192512; cv=none; d=google.com; s=arc-20160816; b=Q6Ct0+7jKPe5HvlbO1bQ7XAibqyH0hva/DD9y+FIC46I2Bz3yRadBvpNrYYfDEcLxj FetOmfogPpYdo/xaTphv64fk0yEBQrrFFR6/mjWxgcHF6/dTNjBtefofE6ldSV9Kn6YG KQ2XV20d2DGj7w2ZgREUaRCmox2O1UjArJ+Nhyk83Zc3L9/pmsxWvL1riBQoaitBR5Vb oqIGO5+8Crc+j3yCuSTP5gG7qIb/wQyG3M344hYo0jHG7O1yeI2RemyeR5BkvOIRSa0R /LkCylKyz+L1J07NAyKLUb2vAkNaysqfnqFVng9MYzfI+yi5KUi2vhgEOjQ97AV2CYn2 l/bA== 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=mzFjWi4UwZIvNo9XY3++yXPjx/0mnps15J8Mx8+sBw4=; b=izgzCFzv3kHmeqZWcIKVvTPjaB+foAh+j9aPZVrH8s8HnVdKPIDVcYjogHF0ft6TAs JbtS02WNuB2nYYbZrv5Nexw9kgSC3rcRmjxjwDOmB56TmvEPeq4ejjnj4Ljmuw+14d0B ue1y5u83lTzjepUUAgqgcjxA7mgUz430bMgfRuAO6QSlUoDUTZmu5su3X2/OmvlHamXY rCab7rhFfaceTjXwabro18Q/76VBPoalPHz25oeeP6H3Ia3YouKgCZ8tSe6GWxFk0wny ItwjL3vW1h6u8Z3am3cEVMahRR/eSfPfuQMWFXOBaJHHT33pZjNVEep56z12BJtDMnKI I8Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AeWA8+9y; 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 y12si1676760ilv.168.2021.09.20.19.48.21; Mon, 20 Sep 2021 19:48:32 -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=AeWA8+9y; 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 S1352989AbhITSfu (ORCPT + 99 others); Mon, 20 Sep 2021 14:35:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:49304 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379763AbhITSa1 (ORCPT ); Mon, 20 Sep 2021 14:30:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 41ABD632F1; Mon, 20 Sep 2021 17:27:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632158832; bh=W067M9YuUs/H/l/wOW2OpgBb+e2lq9U28N6uJgw6CEw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AeWA8+9yiBmAtoY9/DADS1aNbk0A0S1clutAmu5jUYfCDXU7uNxQDu9q84yyokzUs lUbJCDSDRqx/w7ToTCyaK9/kZEL0AU+9lC3zPjbymEWDpCeCzIuIH9bO3O6hiIvwbq fgHIl9o1Dg6Ivc1GjiuPW+o7w5+TSkRk3ZZ5Cr0M= 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.10 077/122] NTB: Fix an error code in ntb_msit_probe() Date: Mon, 20 Sep 2021 18:44:09 +0200 Message-Id: <20210920163918.301855871@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163915.757887582@linuxfoundation.org> References: <20210920163915.757887582@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 7095ecd6223a..4e18e08776c9 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); -- 2.30.2