treewide: kzalloc() -> kcalloc()
[linux-2.6-block.git] / drivers / net / wireless / ath / carl9170 / main.c
index 29e93c953d939b310a393f7cee3e380dd426904d..7f1bdea742b8ae88ab84508f502d2f49295f2187 100644 (file)
@@ -1958,7 +1958,7 @@ static int carl9170_parse_eeprom(struct ar9170 *ar)
        if (!bands)
                return -EINVAL;
 
-       ar->survey = kzalloc(sizeof(struct survey_info) * chans, GFP_KERNEL);
+       ar->survey = kcalloc(chans, sizeof(struct survey_info), GFP_KERNEL);
        if (!ar->survey)
                return -ENOMEM;
        ar->num_channels = chans;
@@ -1988,8 +1988,9 @@ int carl9170_register(struct ar9170 *ar)
        if (WARN_ON(ar->mem_bitmap))
                return -EINVAL;
 
-       ar->mem_bitmap = kzalloc(roundup(ar->fw.mem_blocks, BITS_PER_LONG) *
-                                sizeof(unsigned long), GFP_KERNEL);
+       ar->mem_bitmap = kcalloc(roundup(ar->fw.mem_blocks, BITS_PER_LONG),
+                                sizeof(unsigned long),
+                                GFP_KERNEL);
 
        if (!ar->mem_bitmap)
                return -ENOMEM;