net/ice/base: support NVM access commands
[dpdk.git] / drivers / net / ice / base / ice_flex_pipe.c
index 73362c9..7daaf10 100644 (file)
@@ -4918,8 +4918,10 @@ ice_add_prof_to_lst(struct ice_hw *hw, enum ice_block blk,
                p->tcam[i].prof_id = map->prof_id;
                p->tcam[i].tcam_idx = ICE_INVALID_TCAM;
 
-               if (ice_ptg_find_ptype(hw, blk, map->ptype[i], &ptg))
+               if (ice_ptg_find_ptype(hw, blk, map->ptype[i], &ptg)) {
+                       ice_free(hw, p);
                        return ICE_ERR_CFG;
+               }
 
                p->tcam[i].ptg = ptg;
        }