]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - sound/pci/maestro3.c
treewide: Use array_size() in vmalloc()
[linux.git] / sound / pci / maestro3.c
index 8f20dec97843edf05df2ea27f5c816fc51f15f1e..224e942f556de061ad91a5e416f4645919d88e94 100644 (file)
@@ -2657,7 +2657,10 @@ snd_m3_create(struct snd_card *card, struct pci_dev *pci,
        chip->irq = pci->irq;
 
 #ifdef CONFIG_PM_SLEEP
-       chip->suspend_mem = vmalloc(sizeof(u16) * (REV_B_CODE_MEMORY_LENGTH + REV_B_DATA_MEMORY_LENGTH));
+       chip->suspend_mem =
+               vmalloc(array_size(sizeof(u16),
+                                  REV_B_CODE_MEMORY_LENGTH +
+                                       REV_B_DATA_MEMORY_LENGTH));
        if (chip->suspend_mem == NULL)
                dev_warn(card->dev, "can't allocate apm buffer\n");
 #endif