]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/net/ehea/ehea_main.c
drivers/net: Convert unbounded kzalloc calls to kcalloc
[net-next-2.6.git] / drivers / net / ehea / ehea_main.c
index 897719b49f96859b11a1f01f4f45e46c03c4cd71..0f9b27b93a7183f9d9a9c74d8aa4ad591abdaa42 100644 (file)
@@ -180,7 +180,7 @@ static void ehea_update_firmware_handles(void)
                         num_portres * EHEA_NUM_PORTRES_FW_HANDLES;
 
        if (num_fw_handles) {
-               arr = kzalloc(num_fw_handles * sizeof(*arr), GFP_KERNEL);
+               arr = kcalloc(num_fw_handles, sizeof(*arr), GFP_KERNEL);
                if (!arr)
                        goto out;  /* Keep the existing array */
        } else
@@ -265,7 +265,7 @@ static void ehea_update_bcmc_registrations(void)
                }
 
        if (num_registrations) {
-               arr = kzalloc(num_registrations * sizeof(*arr), GFP_ATOMIC);
+               arr = kcalloc(num_registrations, sizeof(*arr), GFP_ATOMIC);
                if (!arr)
                        goto out;  /* Keep the existing array */
        } else