rtl8366_smi: move variable initialization out from the loop

SVN-Revision: 19239
lede-17.01
Gabor Juhos 2010-01-20 07:06:15 +00:00
parent 428f066b77
commit 43815d730b
1 changed files with 5 additions and 5 deletions

View File

@ -941,12 +941,12 @@ static int rtl8366s_reset_vlan(struct rtl8366_smi *smi)
struct rtl8366s_vlanconfig vlanmc; struct rtl8366s_vlanconfig vlanmc;
/* clear 16 VLAN member configuration */ /* clear 16 VLAN member configuration */
for (i = 0; i < RTL8366_NUM_VLANS; i++) {
vlanmc.vid = 0; vlanmc.vid = 0;
vlanmc.priority = 0; vlanmc.priority = 0;
vlanmc.member = 0; vlanmc.member = 0;
vlanmc.untag = 0; vlanmc.untag = 0;
vlanmc.fid = 0; vlanmc.fid = 0;
for (i = 0; i < RTL8366_NUM_VLANS; i++) {
if (rtl8366s_set_vlan_member_config(smi, i, &vlanmc) != 0) if (rtl8366s_set_vlan_member_config(smi, i, &vlanmc) != 0)
return -EIO; return -EIO;
} }