Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
[linux-2.6-microblaze.git] / drivers / net / wireless / mediatek / mt76 / agg-rx.c
index b67acc6..1e8cdce 100644 (file)
@@ -246,8 +246,7 @@ int mt76_rx_aggr_start(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tidno,
 
        mt76_rx_aggr_stop(dev, wcid, tidno);
 
-       tid = kzalloc(sizeof(*tid) + size * sizeof(tid->reorder_buf[0]),
-                     GFP_KERNEL);
+       tid = kzalloc(struct_size(tid, reorder_buf, size), GFP_KERNEL);
        if (!tid)
                return -ENOMEM;