diff options
Diffstat (limited to 'virt/kvm/irqchip.c')
-rw-r--r-- | virt/kvm/irqchip.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/virt/kvm/irqchip.c b/virt/kvm/irqchip.c index 2e6fc7c66a11..58e4f88b2b9f 100644 --- a/virt/kvm/irqchip.c +++ b/virt/kvm/irqchip.c @@ -184,9 +184,7 @@ int kvm_set_irq_routing(struct kvm *kvm, nr_rt_entries += 1; - new = kzalloc(sizeof(*new) + (nr_rt_entries * sizeof(struct hlist_head)), - GFP_KERNEL_ACCOUNT); - + new = kzalloc(struct_size(new, map, nr_rt_entries), GFP_KERNEL_ACCOUNT); if (!new) return -ENOMEM; |