Merge branches 'sh/serial-rework' and 'sh/oprofile'
[pandora-kernel.git] / arch / ia64 / kernel / module.c
index e83e2ea..aaa7d90 100644 (file)
@@ -135,15 +135,6 @@ static const char *reloc_name[256] = {
 
 #undef N
 
-struct got_entry {
-       uint64_t val;
-};
-
-struct fdesc {
-       uint64_t ip;
-       uint64_t gp;
-};
-
 /* Opaque struct for insns, to protect against derefs. */
 struct insn;
 
@@ -321,7 +312,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;
        }