@@ -1126,9 +1126,8 @@ int ipc4_process_on_core(uint32_t core, bool blocking)
11261126 return IPC4_SUCCESS ;
11271127}
11281128
1129- __cold static const struct comp_driver * ipc4_get_drv (const void * uuid )
1129+ __cold static const struct comp_driver * ipc4_search_for_drv (const void * uuid )
11301130{
1131- const struct sof_uuid * const __maybe_unused sof_uuid = (const struct sof_uuid * )uuid ;
11321131 struct comp_driver_list * drivers = comp_drivers_get ();
11331132 struct list_item * clist ;
11341133 const struct comp_driver * drv = NULL ;
@@ -1149,21 +1148,29 @@ __cold static const struct comp_driver *ipc4_get_drv(const void *uuid)
11491148 info -> drv -> type ,
11501149 info -> drv -> tctx -> uuid_p );
11511150 drv = info -> drv ;
1152- goto out ;
1151+ break ;
11531152 }
11541153 }
11551154
1156- tr_warn (& comp_tr ,
1157- "the provided UUID (%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x) can't be found!" ,
1158- sof_uuid -> a , sof_uuid -> b , sof_uuid -> c , sof_uuid -> d [0 ], sof_uuid -> d [1 ],
1159- sof_uuid -> d [2 ], sof_uuid -> d [3 ], sof_uuid -> d [4 ], sof_uuid -> d [5 ], sof_uuid -> d [6 ],
1160- sof_uuid -> d [7 ]);
1161-
1162- out :
11631155 irq_local_enable (flags );
11641156 return drv ;
11651157}
11661158
1159+ __cold static const struct comp_driver * ipc4_get_drv (const void * uuid )
1160+ {
1161+ const struct comp_driver * drv = ipc4_search_for_drv (uuid );
1162+ const struct sof_uuid * const __maybe_unused sof_uuid = (const struct sof_uuid * )uuid ;
1163+
1164+ if (!drv )
1165+ tr_warn (& comp_tr ,
1166+ "the provided UUID (%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x) can't be found!" ,
1167+ sof_uuid -> a , sof_uuid -> b , sof_uuid -> c , sof_uuid -> d [0 ], sof_uuid -> d [1 ],
1168+ sof_uuid -> d [2 ], sof_uuid -> d [3 ], sof_uuid -> d [4 ], sof_uuid -> d [5 ],
1169+ sof_uuid -> d [6 ], sof_uuid -> d [7 ]);
1170+
1171+ return drv ;
1172+ }
1173+
11671174/*
11681175 * Called from
11691176 * - ipc4_get_large_config_module_instance()
@@ -1174,7 +1181,6 @@ __cold static const struct comp_driver *ipc4_get_drv(const void *uuid)
11741181__cold const struct comp_driver * ipc4_get_comp_drv (uint32_t module_id )
11751182{
11761183 const struct sof_man_fw_desc * desc = NULL ;
1177- const struct comp_driver * drv ;
11781184 const struct sof_man_module * mod ;
11791185 uint32_t entry_index ;
11801186
@@ -1223,18 +1229,18 @@ __cold const struct comp_driver *ipc4_get_comp_drv(uint32_t module_id)
12231229 return NULL ;
12241230#endif
12251231 }
1226- /* Check already registered components */
1227- drv = ipc4_get_drv (& mod -> uuid );
12281232
12291233#if CONFIG_LIBRARY_MANAGER
1230- if (!drv ) {
1231- /* New module not registered yet. */
1232- lib_manager_register_module (module_id );
1233- drv = ipc4_get_drv (& mod -> uuid );
1234- }
1235- #endif
1234+ /* Check already registered components */
1235+ const struct comp_driver * drv = ipc4_search_for_drv (& mod -> uuid );
12361236
1237- return drv ;
1237+ if (drv )
1238+ return drv ;
1239+
1240+ /* New module not registered yet. */
1241+ lib_manager_register_module (module_id );
1242+ #endif
1243+ return ipc4_get_drv (& mod -> uuid );
12381244}
12391245
12401246struct comp_dev * ipc4_get_comp_dev (uint32_t comp_id )
0 commit comments