int dest_num)
{
struct mlx5_flow_group *g;
- struct mlx5_flow_handle *rule = ERR_PTR(-ENOENT);
+ struct mlx5_flow_handle *rule;
struct rhlist_head *tmp, *list;
struct match_list {
struct list_head list;
unlock_ref_node(&g->node);
}
+ rule = ERR_PTR(-ENOENT);
+
free_list:
if (!list_empty(&match_head)) {
struct match_list *match_tmp;
nested_lock_ref_node(&ft->node, FS_MUTEX_GRANDPARENT);
rule = try_add_to_existing_fg(ft, spec, flow_act, dest, dest_num);
- if (!IS_ERR(rule))
+ if (!IS_ERR(rule) || PTR_ERR(rule) != -ENOENT)
goto unlock;
g = create_autogroup(ft, spec->match_criteria_enable,