net/mlx4: Remove many unnecessary NULL values
authorRuan Jinjie <ruanjinjie@huawei.com>
Wed, 2 Aug 2023 04:00:26 +0000 (12:00 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 3 Aug 2023 13:29:37 +0000 (15:29 +0200)
commit3986892646de95b916f6bf1c22b35dd2a3b3715a
tree31a5e869224c25617143b0adec4e397b425a5522
parent3cb6a338c3d4f5f60fed0a26a203ed2c208d189d
net/mlx4: Remove many unnecessary NULL values

The NULL initialization of the pointers assigned by kzalloc() first is
not necessary, because if the kzalloc() failed, the pointers will be
assigned NULL, otherwise it works as usual. so remove it.

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Link: https://lore.kernel.org/r/20230802040026.2588675-1-ruanjinjie@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
drivers/net/ethernet/mellanox/mlx4/en_netdev.c
drivers/net/ethernet/mellanox/mlx4/main.c