drivers/net: Convert unbounded kzalloc calls to kcalloc
[pandora-kernel.git] / drivers / net / wireless / rt2x00 / rt2x00queue.c
index a3401d3..9c609be 100644 (file)
@@ -755,7 +755,7 @@ static int rt2x00queue_alloc_entries(struct data_queue *queue,
         * Allocate all queue entries.
         */
        entry_size = sizeof(*entries) + qdesc->priv_size;
-       entries = kzalloc(queue->limit * entry_size, GFP_KERNEL);
+       entries = kcalloc(queue->limit, entry_size, GFP_KERNEL);
        if (!entries)
                return -ENOMEM;
 
@@ -891,7 +891,7 @@ int rt2x00queue_allocate(struct rt2x00_dev *rt2x00dev)
         */
        rt2x00dev->data_queues = 2 + rt2x00dev->ops->tx_queues + req_atim;
 
-       queue = kzalloc(rt2x00dev->data_queues * sizeof(*queue), GFP_KERNEL);
+       queue = kcalloc(rt2x00dev->data_queues, sizeof(*queue), GFP_KERNEL);
        if (!queue) {
                ERROR(rt2x00dev, "Queue allocation failed.\n");
                return -ENOMEM;