diff options
author | Ruan Jinjie <ruanjinjie@huawei.com> | 2023-08-04 04:43:44 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2023-08-07 20:53:52 +0300 |
commit | a0ae00e71e3e652c3bde8dcb61b4c1718618192e (patch) | |
tree | f68b1db5193475f0ce0662fa99bb4cf0c33d26ab /drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c | |
parent | f14c1a14e63227a65faa68237687784a6dd2e922 (diff) | |
download | linux-a0ae00e71e3e652c3bde8dcb61b4c1718618192e.tar.xz |
net/mlx5: remove many unnecessary NULL values
There are many pointers assigned first, which need not to be
initialized, so remove the NULL assignments.
Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c b/drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c index 39c03dcbd196..e5c1012921d2 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c @@ -57,7 +57,7 @@ static const char * const mlx5_fpga_qp_error_strings[] = { }; static struct mlx5_fpga_device *mlx5_fpga_device_alloc(void) { - struct mlx5_fpga_device *fdev = NULL; + struct mlx5_fpga_device *fdev; fdev = kzalloc(sizeof(*fdev), GFP_KERNEL); if (!fdev) @@ -252,7 +252,7 @@ out: int mlx5_fpga_init(struct mlx5_core_dev *mdev) { - struct mlx5_fpga_device *fdev = NULL; + struct mlx5_fpga_device *fdev; if (!MLX5_CAP_GEN(mdev, fpga)) { mlx5_core_dbg(mdev, "FPGA capability not present\n"); |