treewide: kmalloc() -> kmalloc_array()
[linux-block.git] / drivers / acpi / apei / hest.c
index 9cb74115a43d76bbfa845feb57ef779bf320f0ad..b1e9f81ebeea25b58ba6c0f9820ad38b4bc5b9e0 100644 (file)
@@ -195,7 +195,8 @@ static int __init hest_ghes_dev_register(unsigned int ghes_count)
        struct ghes_arr ghes_arr;
 
        ghes_arr.count = 0;
-       ghes_arr.ghes_devs = kmalloc(sizeof(void *) * ghes_count, GFP_KERNEL);
+       ghes_arr.ghes_devs = kmalloc_array(ghes_count, sizeof(void *),
+                                          GFP_KERNEL);
        if (!ghes_arr.ghes_devs)
                return -ENOMEM;