Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2353658pxb; Mon, 20 Sep 2021 19:52:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRVNYrmEbyOM9woRMuN6/uZGYDKEW6z3u8jhNfOMpDNXHp8TXjtW0Z4wl+BkgLmRbdi9b3 X-Received: by 2002:a5e:8d10:: with SMTP id m16mr6205409ioj.215.1632192734480; Mon, 20 Sep 2021 19:52:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192734; cv=none; d=google.com; s=arc-20160816; b=jRe36AHic8WMtNqsJXuiHVugHqhMLHPxmkIWvInfgvYiQGJj2HerxbDe79Z6H4z1MB 1381N2pjuqZxbxjSKEJgbX8rFDuptPPL3/1O71QwRYveMxR3ylDsArVWEPYEIUZptNQ6 v6+ucTmNcC1pKKLR0fonw8jF1H98/0Q46luaHWWgQgJZDxVOQSwnmCuammWt9r2Li9k9 R7SjHZL7QBgKJorX4LmxYaw7qVy21/xA/4i5zkHFQa6URaQTTY7DVzjokWJENDU4vxhQ uwW5i0eu5OQF9+Wtl0Mja3TrD7+v062wmtMkS0cwVQ61ywxybNcNkJ4flrZhk6Vrc+WO 7ohA== 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=82D2tQnPZtrclkJU4nis6AIQJVpse4IZIU3/9KO6uUY=; b=vsiDf80o9iicDZS8iNWbQUvc2/dMcakXj9F/3dLQvetL0OlDOFuqKJaXmt82qEqzGG CD4Dvb39d5QGcxhOyKo37WO25roDbG0w6N9NQpGQH5AwUEWAPlTVmk+DZxLbeUtl2bW1 0vX8PsNAoafoPA0+GHmx5w9tS7E2rd1asD0WGXjYBTsrRGw8FlxpP2e3+sIbu5zO3tb3 rvn2y2uXIkEYHrIEfpqnRXn91r5wuOEA/CuGYeG9HgWBcutcKp4r3tGJDvWnLFyzliBL 9LtzQAogW8pPU7GaoLJdcVz9rhE/cM8OJdyLqf37UIBXUkmrzLLND+NhmwKZtIwscJC6 BYnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=y0qlKhcm; 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 o7si15626955ilj.101.2021.09.20.19.52.03; Mon, 20 Sep 2021 19:52:14 -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=y0qlKhcm; 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 S1354443AbhITSsz (ORCPT + 99 others); Mon, 20 Sep 2021 14:48:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:58210 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383980AbhITSqS (ORCPT ); Mon, 20 Sep 2021 14:46:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AFF136335A; Mon, 20 Sep 2021 17:33:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632159192; bh=P8tuf+tDy2pcR8mAryvwRZSmAXGTiQWLnb3UXVnShc0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=y0qlKhcm0SilSx4RCnTLgXZ/mJczmq7pn9KzZoBJcJHuQUDjRa4n9wapi66N4GUMI zxCoHfSCim3VrEIVGKOyP5Fj7HJBLrHp0cwy+M5oor8bej9OCuy2XrhOtg5L6fcaPy JoJShzOHIUuGY+MkPVXsM49PpnC+eU02iljtvHAU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Abaci Robot , Yang Li , Serge Semin , Jon Mason , Sasha Levin Subject: [PATCH 5.14 118/168] NTB: perf: Fix an error code in perf_setup_inbuf() Date: Mon, 20 Sep 2021 18:44:16 +0200 Message-Id: <20210920163925.519036295@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163921.633181900@linuxfoundation.org> References: <20210920163921.633181900@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 0097ae5f7af5684f961a5f803ff7ad3e6f933668 ] When the function IS_ALIGNED() returns false, the value of ret is 0. So, we set ret to -EINVAL to indicate this error. Clean up smatch warning: drivers/ntb/test/ntb_perf.c:602 perf_setup_inbuf() warn: missing error code 'ret'. Reported-by: Abaci Robot Signed-off-by: Yang Li Reviewed-by: Serge Semin Signed-off-by: Jon Mason Signed-off-by: Sasha Levin --- drivers/ntb/test/ntb_perf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c index 89df1350fefd..65e1e5cf1b29 100644 --- a/drivers/ntb/test/ntb_perf.c +++ b/drivers/ntb/test/ntb_perf.c @@ -598,6 +598,7 @@ static int perf_setup_inbuf(struct perf_peer *peer) return -ENOMEM; } if (!IS_ALIGNED(peer->inbuf_xlat, xlat_align)) { + ret = -EINVAL; dev_err(&perf->ntb->dev, "Unaligned inbuf allocated\n"); goto err_free_inbuf; } -- 2.30.2