Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp959873pxb; Sun, 7 Mar 2021 01:18:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJyd8ybnOWt7xc5k3tzYHBYvTFCWK0Orj2ldo7PZjjHQlrhu4H3WCnc30L9xVabLB0sxiIx+ X-Received: by 2002:a17:906:ecf3:: with SMTP id qt19mr9978206ejb.467.1615108702228; Sun, 07 Mar 2021 01:18:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615108702; cv=none; d=google.com; s=arc-20160816; b=kFwwenuI7mE59D/zpeFiCOUR8P9zC38gTWmNI0VtfoOdvPuK0w/Qx/tgninQpAx4Dm 8Q/bHrT1QcZIsPw5p63XFNVFeWkx5njwP8YH2FdcVIS3Qzr0VgAoidjtot/+VRPdg78E olUrfk95+//tKY9diDNd6teSpMUw7l44B93ax9/Merjx1UzjwCE2vUQSFFMMmPMi3gMi T25Hy0eIyRhEO2WVtLbC3IxI8zI7n1ysbfHokfILRwH2qZX0PWsBwDdLVtbYKvawpVOq L6pWzmJSKNxVVfqPbHeIyqOTF5ahljNJWJzPPdU8byFvqiDdSPbUMB6SjPUfxbUhtASM QjuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6/0/P+5FGySDb5y25lodVQ42fCDkC0N+Ck+jrq7nMKY=; b=b3RUFZ88ZYCNkJzFXKFi5aRYHtFqZVxWArHZI50vftr4Tz4g/NdAmVdeeXkKCkJziY rIQ7DpmNwROLzbIVbQzDhzYY0UnLhYJjAXpsy9i1k+at0YNoshYhNMlCJ7Qx5TqjEikK m8X+cS/MKR8UvdVpDyfiVOp1YwrhyevB+pI4rwnzcTWNA5aW7peyszhxQkOJcgmn9tPt 0GI3LZaxmiAx6Trbnb+ISxrPBk33YuhJ8A2SR2k+Zsbp7pqZAe+4SJddr+XZqwlrK7Eu BruyQi3Q1W0rmbhzEa/jDolHG6AADXY+VVfj6kXGFTi1y+3J2y9xTEY7W5IiJP3web6j c+Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=obhNE3La; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s9si5015227edc.296.2021.03.07.01.17.59; Sun, 07 Mar 2021 01:18:22 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=obhNE3La; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231386AbhCGJNf (ORCPT + 99 others); Sun, 7 Mar 2021 04:13:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:38912 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231393AbhCGJN0 (ORCPT ); Sun, 7 Mar 2021 04:13:26 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5C45D65135; Sun, 7 Mar 2021 09:13:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615108406; bh=SEZex5rnGZhTc5ZP5HkX8RmLz9ASnYMBQobd3oDgRO8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=obhNE3LabZyZPW6jleR5IfMjeJ6Eblb2XtkZTZ/ReJFiZURpoWicIvKnH2Pa2otcZ 1aolAOG4mph1LoVZAnSK+3UamsfI+dcPynGiMzXzqZ5eoMvj1IyZ5uyizgXqX7myEQ JE6UscMBjJ9VQSNUwFTW/G/SDdbL42T92++7wu8b37k/hwOi8mL7NoWoXFaIZuJcfp uK+JQBOZzUhlsACJ4wUcjvpkYD51L/Tr0VBJaKb97QPIn3bsNlszzoDlZnyZ+at3+T 9FbDr6GI3p5qMWZROuDxvDtoSSmJuUTw7zXs04n4jgtZEQGsIOgmj8qsCLBxTqnZZb +Lc/J2w1uJdlw== Date: Sun, 7 Mar 2021 11:13:22 +0200 From: Leon Romanovsky To: Jia-Ju Bai Cc: bharat@chelsio.com, dledford@redhat.com, jgg@ziepe.ca, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] infiniband: hw: cxgb4: fix error return code of close_listsrv_rpl() Message-ID: References: <20210306135548.17939-1-baijiaju1990@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210306135548.17939-1-baijiaju1990@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 06, 2021 at 05:55:48AM -0800, Jia-Ju Bai wrote: > When ep is NULL, no error code of close_listsrv_rpl() is returned. > To fix this bug, close_listsrv_rpl() returns -EINVAL in this case. I don't think that this is an error. > > Reported-by: TOTE Robot > Signed-off-by: Jia-Ju Bai > --- > drivers/infiniband/hw/cxgb4/cm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c > index 8769e7aa097f..94492d2dfdc7 100644 > --- a/drivers/infiniband/hw/cxgb4/cm.c > +++ b/drivers/infiniband/hw/cxgb4/cm.c > @@ -2400,7 +2400,7 @@ static int close_listsrv_rpl(struct c4iw_dev *dev, struct sk_buff *skb) > > if (!ep) { > pr_warn("%s stid %d lookup failure!\n", __func__, stid); > - goto out; > + return -EINVAL; > } > pr_debug("ep %p\n", ep); > c4iw_wake_up_noref(ep->com.wr_waitp, status2errno(rpl->status)); > -- > 2.17.1 >