}
static int _mv88e6xxx_atu_getnext(struct dsa_switch *ds, u16 fid,
- const unsigned char *addr,
struct mv88e6xxx_atu_entry *entry)
{
struct mv88e6xxx_atu_entry next = { 0 };
if (ret < 0)
return ret;
- ret = _mv88e6xxx_atu_mac_write(ds, addr);
- if (ret < 0)
- return ret;
-
ret = _mv88e6xxx_reg_write(ds, REG_GLOBAL, GLOBAL_ATU_FID, fid);
if (ret < 0)
return ret;
fid = vtu.fid;
}
- ret = _mv88e6xxx_atu_getnext(ds, fid, addr, &next);
+ ret = _mv88e6xxx_atu_mac_write(ds, addr);
+ if (ret < 0)
+ goto unlock;
+
+ ret = _mv88e6xxx_atu_getnext(ds, fid, &next);
if (ret < 0)
goto unlock;