Message ID | 905bebc45f6e246031f0c5c177bba8efe11e05f5.1722345311.git.petrm@nvidia.com (mailing list archive) |
---|---|
State | Accepted |
Commit | e25f3040a61961c9f1bcb896b983a33b64d978e2 |
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 36b883a7ee60..e9bf11a38ae9 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c @@ -509,7 +509,7 @@ mlxsw_thermal_modules_init(struct device *dev, struct mlxsw_core *core, return 0; err_thermal_module_init: - for (i = area->tz_module_num - 1; i >= 0; i--) + for (i--; i >= 0; i--) mlxsw_thermal_module_fini(&area->tz_module_arr[i]); kfree(area->tz_module_arr); return err;