diff options
author | Zheng Yongjun <zhengyongjun3@huawei.com> | 2020-12-09 17:26:21 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-12-09 17:05:37 -0800 |
commit | 965b8b2bad0acaea6d7b20493394bf80075021a5 (patch) | |
tree | 7756c1a1e93a9d52db0c41af8a6d615a45f0bdff | |
parent | 6f2d5cf9756dab190e79edd4ec098c81dca6743c (diff) | |
download | linux-stable-965b8b2bad0acaea6d7b20493394bf80075021a5.tar.gz linux-stable-965b8b2bad0acaea6d7b20493394bf80075021a5.tar.bz2 linux-stable-965b8b2bad0acaea6d7b20493394bf80075021a5.zip |
net: dsa: simplify the return rtl8366_vlan_prepare()
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>
-rw-r--r-- | drivers/net/dsa/rtl8366.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/dsa/rtl8366.c b/drivers/net/dsa/rtl8366.c index 307466b90489..83d481ef9273 100644 --- a/drivers/net/dsa/rtl8366.c +++ b/drivers/net/dsa/rtl8366.c @@ -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)) @@ -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); |