struct ice_vsig_prof *p;
/* copy to the input list */
- p = (struct ice_vsig_prof *)ice_malloc(hw, sizeof(*p));
+ p = (struct ice_vsig_prof *)ice_memdup(hw, ent1, sizeof(*p),
+ ICE_NONDMA_TO_NONDMA);
if (!p)
goto err_ice_get_profs_vsig;
- ice_memcpy(p, ent1, sizeof(*p), ICE_NONDMA_TO_NONDMA);
-
LIST_ADD_TAIL(&p->list, lst);
}
recps[rid].big_recp = (num_recps > 1);
recps[rid].n_grp_count = num_recps;
recps[rid].root_buf = (struct ice_aqc_recipe_data_elem *)
- ice_calloc(hw, recps[rid].n_grp_count,
- sizeof(struct ice_aqc_recipe_data_elem));
+ ice_memdup(hw, tmp, recps[rid].n_grp_count *
+ sizeof(*recps[rid].root_buf), ICE_NONDMA_TO_NONDMA);
if (!recps[rid].root_buf)
goto err_unroll;
- ice_memcpy(recps[rid].root_buf, tmp, recps[rid].n_grp_count *
- sizeof(*recps[rid].root_buf), ICE_NONDMA_TO_NONDMA);
-
/* Copy result indexes */
ice_memcpy(recps[rid].res_idxs, result_bm, sizeof(recps[rid].res_idxs),
ICE_NONDMA_TO_NONDMA);