浏览代码

qed: add error handling flow to TID deregistratin posting failure

If the posting of the ramrod for the purpose of TID deregistration
fails, abort the deregistration operation without using the FW's
return code.

Signed-off-by: Ram Amrani <Ram.Amrani@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ram Amrani 8 年之前
父节点
当前提交
105361943d
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/net/ethernet/qlogic/qed/qed_roce.c

+ 2 - 0
drivers/net/ethernet/qlogic/qed/qed_roce.c

@@ -2457,6 +2457,8 @@ qed_rdma_register_tid(void *rdma_cxt,
 	}
 
 	rc = qed_spq_post(p_hwfn, p_ent, &fw_return_code);
+	if (rc)
+		return rc;
 
 	if (fw_return_code != RDMA_RETURN_OK) {
 		DP_NOTICE(p_hwfn, "fw_return_code = %d\n", fw_return_code);