Fixed a bug that I had introduced with the new "options" handling.
authorRobert Griebl <griebl@gmx.de>
Mon, 29 Jul 2002 20:28:38 +0000 (20:28 -0000)
committerRobert Griebl <griebl@gmx.de>
Mon, 29 Jul 2002 20:28:38 +0000 (20:28 -0000)
modutils/modprobe.c

index 36d2aa211d8a7b9cab320cfe8e39fb7053be6469..1f4aebbd7c8042fee30a900862da6c815e4ca1be 100644 (file)
@@ -349,16 +349,17 @@ static void check_dep ( char *mod, struct mod_list_t **head, struct mod_list_t *
                        struct dep_t *adt;
                
                        for ( adt = depend; adt; adt = adt-> m_next ) {
-                               if ( strcmp ( adt-> m_module, dt-> m_deparr [0] ) == 0 ) {
-                                       if ( !opt )
-                                               opt = adt-> m_options;
+                               if ( strcmp ( adt-> m_module, dt-> m_deparr [0] ) == 0 )
                                        break;
-                               }
                        }
-                       if ( !adt )
-                               return;
+                       if ( adt ) {
+                               dt = adt;                       
+                               mod = dt-> m_module;
+                               if ( !opt )
+                                       opt = dt-> m_options;
+                       }
                        else
-                               dt = adt;
+                               return;
                }
                else
                        return;