Message ID | 01cf542d-c65e-ff66-6fb0-5ce75af184de@users.sourceforge.net (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
diff --git a/arch/powerpc/sysdev/ppc4xx_msi.c b/arch/powerpc/sysdev/ppc4xx_msi.c index 8fb8061..0bd5e4b 100644 --- a/arch/powerpc/sysdev/ppc4xx_msi.c +++ b/arch/powerpc/sysdev/ppc4xx_msi.c @@ -89,7 +89,9 @@ static int ppc4xx_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) if (type == PCI_CAP_ID_MSIX) pr_debug("ppc4xx msi: MSI-X untested, trying anyway.\n"); - msi_data->msi_virqs = kmalloc((msi_irqs) * sizeof(int), GFP_KERNEL); + msi_data->msi_virqs = kmalloc_array(msi_irqs, + sizeof(*msi_data->msi_virqs), + GFP_KERNEL); if (!msi_data->msi_virqs) return -ENOMEM;