Skip to content

Commit

Permalink
net: dsa: simplify the return rtl8366_vlan_prepare()
Browse files Browse the repository at this point in the history
Simplify the return expression.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Zheng Yongjun authored and David S. Miller committed Dec 10, 2020
1 parent 6f2d5cf commit 965b8b2
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/net/dsa/rtl8366.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,6 @@ int rtl8366_vlan_prepare(struct dsa_switch *ds, int port,
{
struct realtek_smi *smi = ds->priv;
u16 vid;
int ret;

for (vid = vlan->vid_begin; vid < vlan->vid_end; vid++)
if (!smi->ops->is_vlan_valid(smi, vid))
Expand All @@ -397,11 +396,7 @@ int rtl8366_vlan_prepare(struct dsa_switch *ds, int port,
* FIXME: what's with this 4k business?
* Just rtl8366_enable_vlan() seems inconclusive.
*/
ret = rtl8366_enable_vlan4k(smi, true);
if (ret)
return ret;

return 0;
return rtl8366_enable_vlan4k(smi, true);
}
EXPORT_SYMBOL_GPL(rtl8366_vlan_prepare);

Expand Down

0 comments on commit 965b8b2

Please sign in to comment.