]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blobdiff - kernel/kexec_file.c
media: usb: em28xx: Replace mdelay() with msleep() in em28xx_pre_card_setup()
[mirror_ubuntu-focal-kernel.git] / kernel / kexec_file.c
index 75d8e7cf040e69bfcde16fb555c09054cfe9ebad..c6a3b6851372c480005d4f053757ba02ad101d8f 100644 (file)
@@ -793,7 +793,7 @@ static int kexec_purgatory_setup_sechdrs(struct purgatory_info *pi,
         * The section headers in kexec_purgatory are read-only. In order to
         * have them modifiable make a temporary copy.
         */
-       sechdrs = vzalloc(pi->ehdr->e_shnum * sizeof(Elf_Shdr));
+       sechdrs = vzalloc(array_size(sizeof(Elf_Shdr), pi->ehdr->e_shnum));
        if (!sechdrs)
                return -ENOMEM;
        memcpy(sechdrs, (void *)pi->ehdr + pi->ehdr->e_shoff,