We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 091f9f7 commit c00f94aCopy full SHA for c00f94a
arch/x86/pci/irq.c
@@ -136,14 +136,14 @@ static inline struct irq_routing_table *pirq_convert_irt_table(u8 *addr,
136
if (ir->signature != IRT_SIGNATURE || !ir->used || ir->size < ir->used)
137
return NULL;
138
139
- size = sizeof(*ir) + ir->used * sizeof(ir->slots[0]);
+ size = struct_size(ir, slots, ir->used);
140
if (size > limit - addr)
141
142
143
DBG(KERN_DEBUG "PCI: $IRT Interrupt Routing Table found at 0x%lx\n",
144
__pa(ir));
145
146
- size = sizeof(*rt) + ir->used * sizeof(rt->slots[0]);
+ size = struct_size(rt, slots, ir->used);
147
rt = kzalloc(size, GFP_KERNEL);
148
if (!rt)
149
0 commit comments