Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[pandora-kernel.git] / arch / alpha / kernel / module.c
index 026ba9a..ebc3c89 100644 (file)
@@ -120,6 +120,12 @@ module_frob_arch_sections(Elf64_Ehdr *hdr, Elf64_Shdr *sechdrs,
 
        nsyms = symtab->sh_size / sizeof(Elf64_Sym);
        chains = kcalloc(nsyms, sizeof(struct got_entry), GFP_KERNEL);
+       if (!chains) {
+               printk(KERN_ERR
+                      "module %s: no memory for symbol chain buffer\n",
+                      me->name);
+               return -ENOMEM;
+       }
 
        got->sh_size = 0;
        got->sh_addralign = 8;