diff options
author | Ido Schimmel <[email protected]> | 2024-07-30 15:58:13 +0200 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2024-07-31 18:38:28 -0700 |
commit | 4be011d76408bb7ecfd2f3e00ab89c9a54ce94ce (patch) | |
tree | ce40bc7d71764f73b55eb292cec83542e59c76cc | |
parent | a1bb54b1a066e30e4130205a7dba78db9df56fa8 (diff) |
mlxsw: core_thermal: Remove unnecessary check
mlxsw_thermal_modules_init() allocates an array of modules and then
calls mlxsw_thermal_module_init() to initialize each entry in the array.
It is therefore impossible for mlxsw_thermal_module_init() to encounter
an entry that is already initialized and has its 'parent' pointer set.
Remove the unnecessary check.
Signed-off-by: Ido Schimmel <[email protected]>
Reviewed-by: Vadim Pasternak <[email protected]>
Signed-off-by: Petr Machata <[email protected]>
Reviewed-by: Wojciech Drewek <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/core_thermal.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c index 0b38bab4eaa8..394e4fd633ef 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c @@ -453,9 +453,6 @@ mlxsw_thermal_module_init(struct device *dev, struct mlxsw_core *core, struct mlxsw_thermal_module *module_tz; module_tz = &area->tz_module_arr[module]; - /* Skip if parent is already set (case of port split). */ - if (module_tz->parent) - return; module_tz->module = module; module_tz->slot_index = area->slot_index; module_tz->parent = thermal; |