|
@@ -1008,6 +1008,7 @@ int mlxsw_core_bus_device_register(const struct mlxsw_bus_info *mlxsw_bus_info,
|
|
|
const char *device_kind = mlxsw_bus_info->device_kind;
|
|
|
struct mlxsw_core *mlxsw_core;
|
|
|
struct mlxsw_driver *mlxsw_driver;
|
|
|
+ struct mlxsw_res *res;
|
|
|
size_t alloc_size;
|
|
|
int err;
|
|
|
|
|
@@ -1032,8 +1033,8 @@ int mlxsw_core_bus_device_register(const struct mlxsw_bus_info *mlxsw_bus_info,
|
|
|
mlxsw_core->bus_priv = bus_priv;
|
|
|
mlxsw_core->bus_info = mlxsw_bus_info;
|
|
|
|
|
|
- err = mlxsw_bus->init(bus_priv, mlxsw_core, mlxsw_driver->profile,
|
|
|
- &mlxsw_core->res);
|
|
|
+ res = mlxsw_driver->res_query_enabled ? &mlxsw_core->res : NULL;
|
|
|
+ err = mlxsw_bus->init(bus_priv, mlxsw_core, mlxsw_driver->profile, res);
|
|
|
if (err)
|
|
|
goto err_bus_init;
|
|
|
|