diff options
author | Leon Romanovsky <leonro@nvidia.com> | 2022-10-13 15:48:43 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2022-11-29 21:09:47 -0800 |
commit | 3c683429b0786634fc75a2a4bf760d3f0fc3f25c (patch) | |
tree | a70f6c93ee9aa33b36d1ade9a3fd86e49a3e6b94 /drivers/net/ethernet | |
parent | d11c0ec2b831ee8420ff042819edeec7b5bb2418 (diff) | |
download | linux-3c683429b0786634fc75a2a4bf760d3f0fc3f25c.tar.bz2 |
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>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/lib/aso.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/aso.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/aso.c index c971ff04dd04..0f9e4f01c85a 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/lib/aso.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/aso.c @@ -334,9 +334,6 @@ err_cq: 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); |