mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
net/mlx5: Remove redundant check
If ASO failed in creation, it won't be called to destroy either. The kernel coding pattern is to make sure that callers are calling to destroy only for valid objects. Reviewed-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
d11c0ec2b8
commit
3c683429b0
|
|
@ -334,9 +334,6 @@ struct mlx5_aso *mlx5_aso_create(struct mlx5_core_dev *mdev, u32 pdn)
|
|||
|
||||
void mlx5_aso_destroy(struct mlx5_aso *aso)
|
||||
{
|
||||
if (IS_ERR_OR_NULL(aso))
|
||||
return;
|
||||
|
||||
mlx5_aso_destroy_sq(aso);
|
||||
mlx5_aso_destroy_cq(&aso->cq);
|
||||
kfree(aso);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user