On 22. 11. 23 0:05, Tony Nguyen wrote:


On 11/16/2023 7:21 AM, Ivan Vecera wrote:

@@ -13197,17 +13193,14 @@ static int i40e_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
      struct i40e_vsi *vsi = np->vsi;
      struct i40e_pf *pf = vsi->back;
      struct i40e_veb *veb = NULL;
-    int i;
      /* Only for PF VSI for now */
      if (vsi->seid != pf->vsi[pf->lan_vsi]->seid)
          return -EOPNOTSUPP;
      /* Find the HW bridge for the PF VSI */
-    i40e_pf_for_each_veb(pf, i, veb)
-        if (veb->seid == vsi->uplink_seid)
-            break;
-    if (i == I40E_MAX_VEB)
+    veb = i40e_pf_get_veb_by_seid(pf, vsi->uplink_seid);
+    if (!vsi)
          return 0;

In addition to the kdoc stuff that Simon pointed out. Should this null check be against veb?

Oops, the check should be against veb here not aganst vsi...
Good eyes, Tony. Thanks, I will fix this.

Ivan

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

Reply via email to