]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/ia64/kernel/module.c
[IA64] adding parameter check to module_free()
[linux-2.6-omap-h63xx.git] / arch / ia64 / kernel / module.c
index e83e2ea3b3e0787ea673ae7451ae2855196f1c38..29aad349e0c4fafd49eb6b8c07bce2f3db3a24d6 100644 (file)
@@ -321,7 +321,8 @@ module_alloc (unsigned long size)
 void
 module_free (struct module *mod, void *module_region)
 {
-       if (mod->arch.init_unw_table && module_region == mod->module_init) {
+       if (mod && mod->arch.init_unw_table &&
+           module_region == mod->module_init) {
                unw_remove_unwind_table(mod->arch.init_unw_table);
                mod->arch.init_unw_table = NULL;
        }