Skip to content

Commit

Permalink
Move safety check
Browse files Browse the repository at this point in the history
  • Loading branch information
cardigliano committed Jul 26, 2024
1 parent e471e4e commit 11b2463
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/intel/iavf/iavf-4.9.5-zc/src/iavf_virtchnl.c
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,10 @@ void iavf_add_ether_addrs(struct iavf_adapter *adapter)

veal->vsi_id = adapter->vsi_res->vsi_id;
veal->num_elements = count;
i = 0;
list_for_each_entry(f, &adapter->mac_filter_list, list) {
if (i == count)
break;
if (is_primary && !(f->is_primary && f->add))
continue;
if (!f->add)
Expand All @@ -1003,9 +1006,6 @@ void iavf_add_ether_addrs(struct iavf_adapter *adapter)
iavf_set_mac_addr_type(&veal->list[i], f);
f->add = false;
i++;

if (i == count)
break;
}

if (!is_more)
Expand Down

0 comments on commit 11b2463

Please sign in to comment.