Merge tag 'x86-asm-2024-03-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
[linux-2.6-block.git] / drivers / irqchip / irq-bcm6345-l1.c
index 9745a119d0e66131524c5999458d42eda2c4b570..eb02d203c9634fb649a27ce03c6a9c00785b60e0 100644 (file)
@@ -242,7 +242,7 @@ static int __init bcm6345_l1_init_one(struct device_node *dn,
        else if (intc->n_words != n_words)
                return -EINVAL;
 
-       cpu = intc->cpus[idx] = kzalloc(sizeof(*cpu) + n_words * sizeof(u32),
+       cpu = intc->cpus[idx] = kzalloc(struct_size(cpu, enable_cache, n_words),
                                        GFP_KERNEL);
        if (!cpu)
                return -ENOMEM;