]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/vfio/pci/vfio_pci_intrs.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[karo-tx-linux.git] / drivers / vfio / pci / vfio_pci_intrs.c
index c2e60893cd09a5772d608ffa5e3364c288f205ab..1c46045b0e7fc6b2e8ef421853742851aa880d7e 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;