Commit e12c2252 authored by Huazhong Tan's avatar Huazhong Tan Committed by David S. Miller

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: 7fa6be4f ("net: hns3: fix incorrect return value/type of some functions")
Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b25ddb00
...@@ -3760,6 +3760,7 @@ static int hns3_reset_notify_init_enet(struct hnae3_handle *handle) ...@@ -3760,6 +3760,7 @@ static int hns3_reset_notify_init_enet(struct hnae3_handle *handle)
/* Hardware table is only clear when pf resets */ /* Hardware table is only clear when pf resets */
if (!(handle->flags & HNAE3_SUPPORT_VF)) { if (!(handle->flags & HNAE3_SUPPORT_VF)) {
ret = hns3_restore_vlan(netdev); ret = hns3_restore_vlan(netdev);
if (ret)
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment