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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Apr 2018 09:02:13 +0000 (11:02 +0200)
commitd810c548157f9f2533864bfb220787eaa9e36e3e
tree51d35d2ac8805c4e5f40d28cfbefd4d2ef3aa66a
parent0bddd43ac2001d87471117ff29e789aa3bcfd18b
RDMA/mlx5: Avoid memory leak in case of XRCD dealloc failure

[ Upstream commit b081808a66345ba725b77ecd8d759bee874cd937 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/mlx5/qp.c