diff options
author | Yuval Shaia <yuval.shaia@oracle.com> | 2018-12-11 12:26:35 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-12-11 14:38:18 -0700 |
commit | 2dd8e44cb4f3893f26ca29e9593450f289a0b48a (patch) | |
tree | 8763ac2f0de6a9af61693066ba37a84b0d22a86a /drivers/infiniband | |
parent | 8cc0698f46ca9cb38e77323e1074f182aac4040a (diff) |
IB/mlx4: Remove unneeded NULL check
NULL check for kfree is unnecessary, remove it.
Fixes: b42dde478bca ("IB/mlx4: Rework special QP creation error path")
Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/mlx4/qp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index 0711ca1dfb8f..74ef7a0ec0b7 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c @@ -1211,10 +1211,10 @@ err_db: 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; } |