[PATCH] UnloadSubModule(): accept pointer value '1' and ignore it.

Matthieu Herrb matthieu.herrb at laas.fr
Sun Jan 1 09:26:11 PST 2012


Some driver modules try to unload submodules that are now built-in.

Signed-off-by: Matthieu Herrb <matthieu.herrb at laas.fr>
---
 hw/xfree86/loader/loadmod.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index 5b9f8d1..c53dfc0 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -1089,7 +1089,8 @@ void
 UnloadSubModule(pointer _mod)
 {
     ModuleDescPtr mod = (ModuleDescPtr)_mod;
-
+    if (_mod == (pointer)1)
+	return;
     RemoveChild(mod);
     UnloadModuleOrDriver(mod);
 }
-- 
1.7.6



More information about the xorg-devel mailing list