treewide: Use array_size() in vmalloc()
[linux-2.6-block.git] / drivers / dma / ipu / ipu_idmac.c
index ed76044ce4b92a41bccfd0169df7df66b58841ca..bbff52be4f0ff1a83bb04e12f278fda864411b08 100644 (file)
@@ -910,7 +910,8 @@ out:
 /* Called with ichan->chan_mutex held */
 static int idmac_desc_alloc(struct idmac_channel *ichan, int n)
 {
-       struct idmac_tx_desc *desc = vmalloc(n * sizeof(struct idmac_tx_desc));
+       struct idmac_tx_desc *desc =
+               vmalloc(array_size(n, sizeof(struct idmac_tx_desc)));
        struct idmac *idmac = to_idmac(ichan->dma_chan.device);
 
        if (!desc)