lkml.org 
[lkml]   [2021]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] infiniband: hw: cxgb4: fix error return code of pass_open_rpl()
Date
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.

Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.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
\
 
 \ /
  Last update: 2021-03-06 14:55    [W:0.031 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site