ath10k: use sizeof(*var) in kmalloc
authorMichal Kazior <michal.kazior@tieto.com>
Tue, 13 Aug 2013 05:54:55 +0000 (07:54 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Wed, 14 Aug 2013 15:00:00 +0000 (18:00 +0300)
This fixes checkpatch warning from the latest
3.11-rc kernel tree.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/pci.c

index 4c94add4960d4ff863ae7785fc407c9ed3ff4cc3..8d24c6920a5b120e160704b5ea4c0f304587de27 100644 (file)
@@ -803,8 +803,7 @@ static int ath10k_pci_start_ce(struct ath10k *ar)
                        continue;
 
                for (i = 0; i < completions; i++) {
-                       compl = kmalloc(sizeof(struct ath10k_pci_compl),
-                                       GFP_KERNEL);
+                       compl = kmalloc(sizeof(*compl), GFP_KERNEL);
                        if (!compl) {
                                ath10k_warn("No memory for completion state\n");
                                ath10k_pci_stop_ce(ar);