diff mbox

[rdma-core,2/2] mlx4: Cleanup upon fatal in the destroy flow

Message ID 1510157897-10384-3-git-send-email-yishaih@mellanox.com (mailing list archive)
State Accepted
Headers show

Commit Message

Yishai Hadas Nov. 8, 2017, 4:18 p.m. UTC
This patch handles the cleanup upon fatal scenario in the destroy flow.
It follows other objects in mlx4. (e.g. QP/CQ/WQ, etc.) that were
previously handled in the same way.

Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
---
 providers/mlx4/verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/providers/mlx4/verbs.c b/providers/mlx4/verbs.c
index 7ecaeb1..042a8e0 100644
--- a/providers/mlx4/verbs.c
+++ b/providers/mlx4/verbs.c
@@ -1542,7 +1542,7 @@  int mlx4_destroy_flow(struct ibv_flow *flow_id)
 
 	ret = ibv_cmd_destroy_flow(flow_id);
 
-	if (ret)
+	if (ret && !cleanup_on_fatal(ret))
 		return ret;
 
 	free(flow_id);