@@ -543,12 +543,14 @@ static int lib_manager_start_agent(const struct comp_driver *drv,
543543 return ret ;
544544 }
545545#endif /* CONFIG_SOF_USERSPACE_PROXY */
546+ if (agent ) {
547+ ret = agent (& agent_params , agent_interface );
548+ if (ret )
549+ tr_err (& lib_manager_tr , "System agent start failed %d!" , ret );
550+ return ret ;
551+ }
546552
547- ret = agent (& agent_params , agent_interface );
548- if (ret )
549- tr_err (& lib_manager_tr , "System agent start failed %d!" , ret );
550-
551- return ret ;
553+ return 0 ;
552554}
553555
554556enum buildinfo_mod_type { MOD_TYPE_INVALID , MOD_TYPE_IADK , MOD_TYPE_LMDK , MOD_TYPE_LLEXT };
@@ -656,6 +658,7 @@ static struct comp_dev *lib_manager_module_create(const struct comp_driver *drv,
656658 tr_err (& lib_manager_tr , "MOD_TYPE_LLEXT" );
657659 agent = NULL ;
658660 ops = (const struct module_interface * )module_entry_point ;
661+ agent_iface = NULL ;
659662 break ;
660663 case MOD_TYPE_LMDK :
661664 tr_err (& lib_manager_tr , "MOD_TYPE_LMDK" );
@@ -675,12 +678,10 @@ static struct comp_dev *lib_manager_module_create(const struct comp_driver *drv,
675678 }
676679
677680 /* At this point module resources are allocated and it is moved to L2 memory. */
678- if (agent ) {
679- ret = lib_manager_start_agent (drv , config , mod , args , module_entry_point , agent ,
680- agent_iface , & userspace , & ops );
681- if (ret )
682- goto err ;
683- }
681+ ret = lib_manager_start_agent (drv , config , mod , args , module_entry_point , agent ,
682+ agent_iface , & userspace , & ops );
683+ if (ret )
684+ goto err ;
684685
685686 if (comp_set_adapter_ops (drv , ops ) < 0 )
686687 goto err ;
0 commit comments