RDMA/mlx5: Avoid memory leak in case of XRCD dealloc failure
authorLeon Romanovsky <leonro@mellanox.com>
Sun, 28 Jan 2018 09:25:30 +0000 (11:25 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Sun, 28 Jan 2018 21:07:16 +0000 (14:07 -0700)
commitb081808a66345ba725b77ecd8d759bee874cd937
treeb938f6a4fe6dafdaf7c8a7ac6f5df67dbbd06a7a
parentf23a5350e43c810ca36b26d4ed4ecd9a08686f47
RDMA/mlx5: Avoid memory leak in case of XRCD dealloc failure

Failure in XRCD FW deallocation command leaves memory leaked and
returns error to the user which he can't do anything about it.

This patch changes behavior to always free memory and always return
success to the user.

Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters")
Reviewed-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/qp.c