Merge tag 'vfio-v4.9-rc4' of git://github.com/awilliam/linux-vfio
[cascardo/linux.git] / drivers / vfio / pci / vfio_pci_intrs.c
index c2e6089..1c46045 100644 (file)
@@ -256,7 +256,7 @@ static int vfio_msi_enable(struct vfio_pci_device *vdev, int nvec, bool msix)
        if (!is_irq_none(vdev))
                return -EINVAL;
 
-       vdev->ctx = kzalloc(nvec * sizeof(struct vfio_pci_irq_ctx), GFP_KERNEL);
+       vdev->ctx = kcalloc(nvec, sizeof(struct vfio_pci_irq_ctx), GFP_KERNEL);
        if (!vdev->ctx)
                return -ENOMEM;