Commit 2dd8e44c authored by Yuval Shaia's avatar Yuval Shaia Committed by Jason Gunthorpe

IB/mlx4: Remove unneeded NULL check

NULL check for kfree is unnecessary, remove it.

Fixes: b42dde47 ("IB/mlx4: Rework special QP creation error path")
Signed-off-by: default avatarYuval Shaia <yuval.shaia@oracle.com>
Reviewed-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 8cc0698f
......@@ -1211,10 +1211,10 @@ static int create_qp_common(struct mlx4_ib_dev *dev, struct ib_pd *pd,
mlx4_db_free(dev->dev, &qp->db);
err:
if (sqp)
kfree(sqp);
else if (!*caller_qp)
if (!sqp && !*caller_qp)
kfree(qp);
kfree(sqp);
return err;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment