Skip to content

Commit

Permalink
module dependencies: immediately exit on mod_init failures
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuchircu committed Feb 4, 2015
1 parent e2c77e4 commit c8f3604
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sr_module.c
Expand Up @@ -499,7 +499,8 @@ static int init_mod( struct sr_module* m, int skip_others)
/* make sure certain modules get loaded before this one */
for (dep = m->sr_deps; dep; dep = dep->next) {
if (!dep->mod->is_loaded)
init_mod(dep->mod, 1);
if (init_mod(dep->mod, 1) != 0)
return -1;
}

if (m->exports->init_f) {
Expand Down

0 comments on commit c8f3604

Please sign in to comment.