}
 EXPORT_SYMBOL(mlxsw_core_driver_priv);
 
-bool mlxsw_core_res_query_enabled(const struct mlxsw_core *mlxsw_core)
-{
-       return mlxsw_core->driver->res_query_enabled;
-}
-EXPORT_SYMBOL(mlxsw_core_res_query_enabled);
-
 bool mlxsw_core_temp_warn_enabled(const struct mlxsw_core *mlxsw_core)
 {
        return mlxsw_core->driver->temp_warn_enabled;
 
        u8 module_sensor_max;
        int i, err;
 
-       if (!mlxsw_core_res_query_enabled(mlxsw_hwmon->core))
-               return 0;
-
        mlxsw_reg_mgpir_pack(mgpir_pl);
        err = mlxsw_reg_query(mlxsw_hwmon->core, MLXSW_REG(mgpir), mgpir_pl);
        if (err)
 
        char mgpir_pl[MLXSW_REG_MGPIR_LEN];
        int i, err;
 
-       if (!mlxsw_core_res_query_enabled(core))
-               return 0;
-
        mlxsw_reg_mgpir_pack(mgpir_pl);
        err = mlxsw_reg_query(core, MLXSW_REG(mgpir), mgpir_pl);
        if (err)
 {
        int i;
 
-       if (!mlxsw_core_res_query_enabled(thermal->core))
-               return;
-
        for (i = thermal->tz_module_num - 1; i >= 0; i--)
                mlxsw_thermal_module_fini(&thermal->tz_module_arr[i]);
        kfree(thermal->tz_module_arr);
        int i;
        int err;
 
-       if (!mlxsw_core_res_query_enabled(core))
-               return 0;
-
        mlxsw_reg_mgpir_pack(mgpir_pl);
        err = mlxsw_reg_query(core, MLXSW_REG(mgpir), mgpir_pl);
        if (err)
 {
        int i;
 
-       if (!mlxsw_core_res_query_enabled(thermal->core))
-               return;
-
        for (i = thermal->tz_gearbox_num - 1; i >= 0; i--)
                mlxsw_thermal_gearbox_tz_fini(&thermal->tz_gearbox_arr[i]);
        kfree(thermal->tz_gearbox_arr);