Message ID | 8db5fe0a3a28ba09a15d4102cc03f7e8ca7675be.1722345311.git.petrm@nvidia.com (mailing list archive) |
---|---|
State | Accepted |
Commit | e7e3a450e5527f3321dc6d0146bf2b86cf44b508 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | mlxsw: core_thermal: Small cleanups | expand |
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c index e9bf11a38ae9..cfbfabec816e 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c @@ -467,11 +467,9 @@ mlxsw_thermal_module_init(struct mlxsw_thermal *thermal, static void mlxsw_thermal_module_fini(struct mlxsw_thermal_module *module_tz) { - if (module_tz && module_tz->tzdev) { - mlxsw_thermal_module_tz_fini(module_tz->tzdev); - module_tz->tzdev = NULL; - module_tz->parent = NULL; - } + mlxsw_thermal_module_tz_fini(module_tz->tzdev); + module_tz->tzdev = NULL; + module_tz->parent = NULL; } static int