--- 1/modprobe.c 2004-01-28 20:32:18.463281560 +0200 +++ 2/modprobe.c 2004-01-28 20:19:44.845848824 +0200 @@ -703,6 +703,11 @@ static void insmod(struct list_head *lis /* Take us off the list. */ list_del(&mod->list); + /* Don't do ANYTHING if already in kernel. */ + if (!ignore_proc + && module_in_kernel(newname ?: mod->modname, NULL) == 1) + goto exists_error; + /* Do things we depend on first, but don't die if they fail. */ if (!list_empty(list)) { insmod(list, NOFAIL(strdup("")), NULL, 0, warn, @@ -710,11 +715,6 @@ static void insmod(struct list_head *lis strip_vermagic, strip_modversion); } - /* Don't do ANYTHING if already in kernel. */ - if (!ignore_proc - && module_in_kernel(newname ? newname : mod->modname, NULL) == 1) - goto exists_error; - command = find_command(mod->modname, commands); if (command && !ignore_commands) { do_command(mod->modname, command, verbose, dry_run, error,