[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YESY5fG5a8sCRiS7@unreal>
Date: Sun, 7 Mar 2021 11:12:05 +0200
From: Leon Romanovsky <leon@...nel.org>
To: Jia-Ju Bai <baijiaju1990@...il.com>
Cc: bharat@...lsio.com, dledford@...hat.com, jgg@...pe.ca,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] infiniband: hw: cxgb4: fix error return code of
pass_open_rpl()
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 <oslab@...nghua.edu.cn>
> Signed-off-by: Jia-Ju Bai <baijiaju1990@...il.com>
> ---
> 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
>
Powered by blists - more mailing lists