infiniband: hw: cxgb4: fix error return code of pass_open_rpl()
Subsystems (2)
PATCH 1/1 infiniband: hw: cxgb4: fix error return code of pass_open_rpl()
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 <[email protected]>
Signed-off-by Jia-Ju Bai <[email protected]>
--- drivers/infiniband/hw/cxgb4/cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/cxgb4/cm.c +1 -1
@@ -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));
Signature · 1 line
2.17.1
Quoted 2 lines · Jia-Ju Bai
When ep is NULL, no error code of
pass_open_rpl()is returned. To fix this bug,pass_open_rpl()returns-EINVALin this case.
Why do you think that this is an error?
Quoted 23 lines
Reported-by TOTE Robot <[email protected]>Signed-off-by Jia-Ju Bai <[email protected]>--- drivers/infiniband/hw/cxgb4/cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/infiniband/hw/cxgb4/cm.c +1
-2@@ -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