Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp638443pxv; Thu, 15 Jul 2021 12:09:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnCHNBTJUF4Ev9kQkbMk7NhgnTaTh9qUuIh8GKopIiTu21aBmQC5AoTUhR9ZEpL+QwVelg X-Received: by 2002:a92:1942:: with SMTP id e2mr3883578ilm.4.1626376186642; Thu, 15 Jul 2021 12:09:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626376186; cv=none; d=google.com; s=arc-20160816; b=jP8ZiTvQu8a8GgVm4X5ElHQq8gnguoKa97mxbY0JyjNJzP7bRIgR4K8xyYU+0JN3Dc 5BlzmRGcxRakJ2bxjHFBacUFTbIX1LmfXIvN+rgGunEG5+rHTD5fdZztthHsh4PFJ89v OjLkpUUT2qJdkcABhmv9IeEDSJ7LUSzZ9jNTBvMav82HaH9qN16g2ARdsW5Q7+1rxO0D dQmCcSfG3v1kGXHQ8Bzqc6N1Oi3PPhG3UzU+qgUeNL6i4OE/jpZVwPT3354O7z2wHCst kAveBlsruHVPgS7xF0NAUtmK2irJpT+zOKimIcpueSTqRzfiuw8rRoHymwIN9I2lhtWt wgUQ== 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=chKlSdig5WaJXsGRGzcZ7t8s7Dfl2OGOL37+35H1FYY=; b=V9XEnVS0pXDzbzyKPBNr0xYCHzMLl3THEBr6ARprtXohcQmYJcMxTW4TN1P6LuKfjE ax4AAHzdZiiTC2Z82X0ck/DIViMbIYk/AYwie+cZAmR/zAMPVuFybN5ryqIj85e0CY07 XnbT1pFhNlbcwICcwrgg5gqE9fAi+hmgjzaHYYavkdlspMrSFll55AivFhK09obGBCrr WIzf6JumYTEuwo0q+Ks1wL7LvCZGkdHqzHGbn022phrwjIhPYwltFToLyPWvmjGaQGxU SO++pxIxFIRrrR6l35b2QS7Gqi0C/Q69EakmYfzqcaMDEWxr8kXQSpDmrZ/YtXUW2mFn OFLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zoUymOrB; 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 m4si7514835ioy.95.2021.07.15.12.09.32; Thu, 15 Jul 2021 12:09:46 -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=zoUymOrB; 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 S244222AbhGOTKx (ORCPT + 99 others); Thu, 15 Jul 2021 15:10:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:35614 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241718AbhGOS7Z (ORCPT ); Thu, 15 Jul 2021 14:59:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A66AC613DB; Thu, 15 Jul 2021 18:56:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375366; bh=XM0qc8OEyEQoRAXRwwR3NOU253deuvnzcoUFNMEsi9M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zoUymOrBa5SaCA/aMa2mEpARYdF9iABAghAWGf7ByyYmhfGqhBafQMr/2FixLA/0B Uv8oYUCndKZyNgGIn9rvnTgVBS9/e6hGd4Vdi514Ob2SV5DLUelEvoYSKwMTTRzRlA 2pOn6evqSoyZPIGrWn54cS6w0zeUx4HFfT6w+Sus= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Abaci Robot , Jiapeng Chong , Jason Gunthorpe , Sasha Levin Subject: [PATCH 5.12 055/242] RDMA/cxgb4: Fix missing error code in create_qp() Date: Thu, 15 Jul 2021 20:36:57 +0200 Message-Id: <20210715182602.026096595@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182551.731989182@linuxfoundation.org> References: <20210715182551.731989182@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: Jiapeng Chong [ Upstream commit aeb27bb76ad8197eb47890b1ff470d5faf8ec9a5 ] The error code is missing in this code scenario so 0 will be returned. Add the error code '-EINVAL' to the return value 'ret'. Eliminates the follow smatch warning: drivers/infiniband/hw/cxgb4/qp.c:298 create_qp() warn: missing error code 'ret'. Link: https://lore.kernel.org/r/1622545669-20625-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/cxgb4/qp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c index d109bb3822a5..c9403743346e 100644 --- a/drivers/infiniband/hw/cxgb4/qp.c +++ b/drivers/infiniband/hw/cxgb4/qp.c @@ -295,6 +295,7 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq, if (user && (!wq->sq.bar2_pa || (need_rq && !wq->rq.bar2_pa))) { pr_warn("%s: sqid %u or rqid %u not in BAR2 range\n", pci_name(rdev->lldi.pdev), wq->sq.qid, wq->rq.qid); + ret = -EINVAL; goto free_dma; } -- 2.30.2