summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu.herrb@laas.fr>2012-01-02 13:11:41 +0000
committerKeith Packard <keithp@keithp.com>2012-01-09 13:09:49 -0800
commitdafc327f3c75205cf7e5360e9ccd71c7457f61a5 (patch)
treeee8a80499797d67b7cf969bf787405f244ad5cee
parent8db029064bcbe378061e812bb8136608e3123226 (diff)
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>
-rw-r--r--hw/xfree86/loader/loadmod.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index 5b9f8d1c3..5b9c11950 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -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);
}