mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 11:33:28 +02:00
IB/mlx4: Remove unneeded NULL check
NULL check for kfree is unnecessary, remove it.
Fixes: b42dde478b ("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>
This commit is contained in:
parent
8cc0698f46
commit
2dd8e44cb4
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user