summaryrefslogtreecommitdiff
path: root/drivers/firmware/efi/capsule.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firmware/efi/capsule.c')
-rw-r--r--drivers/firmware/efi/capsule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/firmware/efi/capsule.c b/drivers/firmware/efi/capsule.c
index 901b9306bf94..4938c29b7c5d 100644
--- a/drivers/firmware/efi/capsule.c
+++ b/drivers/firmware/efi/capsule.c
@@ -231,7 +231,7 @@ int efi_capsule_update(efi_capsule_header_t *capsule, phys_addr_t *pages)
count = DIV_ROUND_UP(imagesize, PAGE_SIZE);
sg_count = sg_pages_num(count);
- sg_pages = kzalloc(sg_count * sizeof(*sg_pages), GFP_KERNEL);
+ sg_pages = kcalloc(sg_count, sizeof(*sg_pages), GFP_KERNEL);
if (!sg_pages)
return -ENOMEM;