]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - drivers/acpi/acpi_video.c
treewide: kmalloc() -> kmalloc_array()
[mirror_ubuntu-jammy-kernel.git] / drivers / acpi / acpi_video.c
index 2f2e737be0f84a966020102ba21ce906c21b9584..f0b52266b3ac6c45ea83a7f446513a179d60531b 100644 (file)
@@ -832,8 +832,9 @@ int acpi_video_get_levels(struct acpi_device *device,
         * in order to account for buggy BIOS which don't export the first two
         * special levels (see below)
         */
-       br->levels = kmalloc((obj->package.count + ACPI_VIDEO_FIRST_LEVEL) *
-                            sizeof(*br->levels), GFP_KERNEL);
+       br->levels = kmalloc_array(obj->package.count + ACPI_VIDEO_FIRST_LEVEL,
+                                  sizeof(*br->levels),
+                                  GFP_KERNEL);
        if (!br->levels) {
                result = -ENOMEM;
                goto out_free;