Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp958795pxb; Sun, 7 Mar 2021 01:15:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJz2YacjhEXaDWca0j9Wd7gWg7sBLgR7/DhfMgDMg+C2P11L9i8K15bP6kAvMW8ttT0kpYWY X-Received: by 2002:a05:6402:5113:: with SMTP id m19mr3725393edd.78.1615108550578; Sun, 07 Mar 2021 01:15:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615108550; cv=none; d=google.com; s=arc-20160816; b=ZRBN/KPuifhkYm+DZ7qkbWk6pZRNFw1/6x0er9png4x/UMakq9wDInP6uSMJL8LTMs qQA9YYxw94Ex3Jnnq7CwJVcittRNDJCyQ9tIN9YFfAee37bZMCjowBh7Ey45NhGODWwF K84jbMtLPoy0ixx/jhYpP2U+SnV/MHsb0zt+oQttyYJNsRHV6H/CDBjQdRzLu3Bbp3xf Z1l8Fm7IyU7QkbT+eGruHBW89pZE55dGUkZ2J+0lDqWK0G+M5OjdOAV2wR3XmRy593Lt Y3ROl9SYPH5F56PQhbjI1vgkwdOIQFQS79Ae91kb4L4O6IR9I/GBU/ydKDWntbi0XAKS f8HQ== 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=dJa9BAxAtiwgkLoVBysrArnTp1GcEVhcwGFsbHc4tgU=; b=feXTwhOsFtdnvzlV6oPP/7k9ihzJpB27VGHPGJ/tcBH4fnJtGMarAdwiudN44Ijt+R 74sTUMBhQLxyLtkCein1xFIH+nl2ZTeuFTTuYHJ2jK+XuCpvh023IQ9FLCHyn0wZW2CU ScAsr8/OJD3lqLg3xBTMcpTxk7kjDXCxgjTdfY+2bO9pGEpGMtSKd6i0VMU9Gps4B9+F NA9T108gjX1xxWMvjErXuz5g2AvSUZSBhl0jdXdurtsHS2F9chQdhJvoRUTcyQHwZWC1 LN443xKlZjKjnERwnhZbXFIz0xVi9855/YcqRkf5VRsELEwnn8yxRUB4HUyUFhD5kNyb /8Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="sE4QM8B/"; 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 d20si4996215eds.530.2021.03.07.01.15.28; Sun, 07 Mar 2021 01:15:50 -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="sE4QM8B/"; 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 S231296AbhCGJM0 (ORCPT + 99 others); Sun, 7 Mar 2021 04:12:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:38640 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230442AbhCGJMJ (ORCPT ); Sun, 7 Mar 2021 04:12:09 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B997C65115; Sun, 7 Mar 2021 09:12:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615108329; bh=64r1NergPuPwb4MswX5BqdZcz+kmHeInEtFiaz12t+c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sE4QM8B/N17NFBd0/E/whSAxXfVofIBAnL4vW3rfMh5KikYswO5+H1s4w2oLL8B49 UFYo5pc722XhN9jIdnj1QTjXl2lOuPM74HX4wbxFtdLbIJ5d/6FMP5QpH+Lf7e7FUS hupoKdSFgCvxdIOgms/Lhysow3PjBv7SSFsbMh7lpTAvby1AoW/JANvlb7JbR9CsJM Kp1fYswJ+zq+JX6rD1oh0hpbFljsI+jTIOf8zrdlG6XYA7r2kPPulhaJS9CyBdV8J6 ucS0xdguq7QP3lnhrG5dMJqV5iQjsyN5L+0KnP0bzlB7pTeIQKcz9U6T1JJcN7rIej 7rR+sArHGx2Aw== Date: Sun, 7 Mar 2021 11:12:05 +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 pass_open_rpl() Message-ID: References: <20210306135317.17803-1-baijiaju1990@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210306135317.17803-1-baijiaju1990@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 06, 2021 at 05:53:17AM -0800, Jia-Ju Bai wrote: > When ep is NULL, no error code of pass_open_rpl() is returned. > To fix this bug, pass_open_rpl() returns -EINVAL in this case. Why do you 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..773d3805bb25 100644 > --- a/drivers/infiniband/hw/cxgb4/cm.c > +++ b/drivers/infiniband/hw/cxgb4/cm.c > @@ -2382,7 +2382,7 @@ static int pass_open_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 status %d error %d\n", ep, > rpl->status, status2errno(rpl->status)); > -- > 2.17.1 >