Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
[pandora-kernel.git] / arch / ia64 / kernel / module.c
index e83e2ea..29aad34 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;
        }