Thread (14 messages) 14 messages, 4 authors, 2024-08-01
STALE670d REVIEWED: 3 (3M)

[PATCH net-next 09/10] mlxsw: core_thermal: Remove unnecessary assignments

From: Petr Machata <petrm@nvidia.com>
Date: 2024-07-30 14:00:12
Subsystem: mellanox ethernet switch drivers, networking drivers, the rest · Maintainers: Ido Schimmel, Petr Machata, Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

From: Ido Schimmel <idosch@nvidia.com>

Setting both pointers to NULL is unnecessary since the code never checks
whether these pointers are NULL or not. Remove the assignments.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Vadim Pasternak <vadimp@nvidia.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlxsw/core_thermal.c | 2 --
 1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
index cfbfabec816e..269c4986ea24 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
@@ -468,8 +468,6 @@ mlxsw_thermal_module_init(struct mlxsw_thermal *thermal,
 static void mlxsw_thermal_module_fini(struct mlxsw_thermal_module *module_tz)
 {
 	mlxsw_thermal_module_tz_fini(module_tz->tzdev);
-	module_tz->tzdev = NULL;
-	module_tz->parent = NULL;
 }
 
 static int
-- 
2.45.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help