iwlagn: Convert kzalloc to kcalloc
authorJoe Perches <joe@perches.com>
Thu, 15 Sep 2011 19:47:26 +0000 (12:47 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 19 Sep 2011 19:58:28 +0000 (15:58 -0400)
Convert kzalloc to kcalloc, coalesce multiple lines too.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-trans.c

index d4f6281605650a999426edfe237ddef8e0257f26..a49fb26bdf5c89ec927e274b26719d3edc5b7ddf 100644 (file)
@@ -308,10 +308,8 @@ static int iwl_trans_txq_alloc(struct iwl_trans *trans,
 
        txq->q.n_window = slots_num;
 
-       txq->meta = kzalloc(sizeof(txq->meta[0]) * slots_num,
-                           GFP_KERNEL);
-       txq->cmd = kzalloc(sizeof(txq->cmd[0]) * slots_num,
-                          GFP_KERNEL);
+       txq->meta = kcalloc(slots_num, sizeof(txq->meta[0]), GFP_KERNEL);
+       txq->cmd = kcalloc(slots_num, sizeof(txq->cmd[0]), GFP_KERNEL);
 
        if (!txq->meta || !txq->cmd)
                goto error;