summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/mlx5
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@mellanox.com>2020-04-27 18:46:34 +0300
committerJason Gunthorpe <jgg@mellanox.com>2020-04-30 18:45:46 -0300
commit6367da46d3cb03ff717457875bd01dda7b02a1ff (patch)
treeb6dcf3adf820c2fee479432ed5a5d659f5b292cb /drivers/infiniband/hw/mlx5
parent08d53976609aec17f28872423d3a3e86ad1a3ec4 (diff)
downloadlwn-6367da46d3cb03ff717457875bd01dda7b02a1ff.tar.gz
lwn-6367da46d3cb03ff717457875bd01dda7b02a1ff.zip
RDMA/mlx5: Remove redundant destroy QP call
After major refactoring in create QP flow, it is no needed to call to destroy QP in XRC_TGT flow. Link: https://lore.kernel.org/r/20200427154636.381474-35-leon@kernel.org Reviewed-by: Maor Gottlieb <maorg@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5')
-rw-r--r--drivers/infiniband/hw/mlx5/qp.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index 9ca742189281..d7983a951e8d 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -1887,7 +1887,6 @@ static int create_xrc_tgt_qp(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp,
struct mlx5_create_qp_params *params)
{
struct ib_qp_init_attr *attr = params->attr;
- struct ib_udata *udata = params->udata;
u32 uidx = params->uidx;
struct mlx5_ib_resources *devr = &dev->devr;
int inlen = MLX5_ST_SZ_BYTES(create_qp_in);
@@ -1944,10 +1943,8 @@ static int create_xrc_tgt_qp(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp,
base = &qp->trans_qp.base;
err = mlx5_core_create_qp(dev, &base->mqp, in, inlen);
kvfree(in);
- if (err) {
- destroy_qp(dev, qp, base, udata);
+ if (err)
return err;
- }
base->container_mibqp = qp;
base->mqp.event = mlx5_ib_qp_event;