diff options
author | Huazhong Tan <tanhuazhong@huawei.com> | 2018-11-07 21:13:19 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-08 19:23:49 -0500 |
commit | e12c225258f2584906765234ca6db4ad4c618192 (patch) | |
tree | 71b0b73579d3600dd5cd8c146804737993bb07b2 | |
parent | b25ddb00bc1b96613edcb525f19203a7d1405fce (diff) |
net: hns3: bugfix for not checking return value
hns3_reset_notify_init_enet() only return error early if the return
value of hns3_restore_vlan() is not 0.
This patch adds checking for the return value of hns3_restore_vlan.
Fixes: 7fa6be4fd2f6 ("net: hns3: fix incorrect return value/type of some functions")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index 3f96aa30068e..20fcf0d1c2ce 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | |||
@@ -3760,7 +3760,8 @@ static int hns3_reset_notify_init_enet(struct hnae3_handle *handle) | |||
3760 | /* Hardware table is only clear when pf resets */ | 3760 | /* Hardware table is only clear when pf resets */ |
3761 | if (!(handle->flags & HNAE3_SUPPORT_VF)) { | 3761 | if (!(handle->flags & HNAE3_SUPPORT_VF)) { |
3762 | ret = hns3_restore_vlan(netdev); | 3762 | ret = hns3_restore_vlan(netdev); |
3763 | return ret; | 3763 | if (ret) |
3764 | return ret; | ||
3764 | } | 3765 | } |
3765 | 3766 | ||
3766 | ret = hns3_restore_fd_rules(netdev); | 3767 | ret = hns3_restore_fd_rules(netdev); |