net/ice/base: use malloc instead of calloc
authorQi Zhang <qi.z.zhang@intel.com>
Fri, 18 Sep 2020 05:21:48 +0000 (13:21 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:35:03 +0000 (23:35 +0100)
Use *malloc() instead of *calloc() when allocating only a single object
as opposed to an array of objects.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
drivers/net/ice/base/ice_switch.c

index cd78685..dc55d7e 100644 (file)
@@ -3366,8 +3366,7 @@ ice_create_vsi_list_map(struct ice_hw *hw, u16 *vsi_handle_arr, u16 num_vsi,
        struct ice_vsi_list_map_info *v_map;
        int i;
 
-       v_map = (struct ice_vsi_list_map_info *)ice_calloc(hw, 1,
-               sizeof(*v_map));
+       v_map = (struct ice_vsi_list_map_info *)ice_malloc(hw, sizeof(*v_map));
        if (!v_map)
                return NULL;