UnloadSubModule(): accept pointer value '1' and ignore it.
Some driver modules try to unload submodules that are now built-in. Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
8db029064b
commit
dafc327f3c
|
@ -1090,6 +1090,9 @@ UnloadSubModule(pointer _mod)
|
|||
{
|
||||
ModuleDescPtr mod = (ModuleDescPtr)_mod;
|
||||
|
||||
/* Some drivers are calling us on built-in submodules, ignore them */
|
||||
if (mod == (ModuleDescPtr)1)
|
||||
return;
|
||||
RemoveChild(mod);
|
||||
UnloadModuleOrDriver(mod);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue